Reply To: DNS views

Home Page Forums Network Management Networking DNS views Reply To: DNS views

#49280

atheling
Member

I guess that would be one solution to the problem of accessing your LAN located servers from inside the LAN. I did it differently:

In your router area on the “virtual servers” use “any” interface and your external IP address to NAT requests to your server(s). That will get traffic to go to your servers regardless of the source (LAN or WAN).

To get traffic to go back to your LAN clients from the server I then added the following to my “setup->startup/cron->NAT and Virtual servers script”

#Fix issue with LAN clients accessing local servers with external IP addresses
iptables -t nat -N custom_postroute
iptables -t nat -A custom_postroute -s 10.7.52.0/24 -d 10.7.52.130 -j MASQUERADE
iptables -t nat -A POSTROUTING --match state --state NEW -j custom_postroute

(Your internal LAN will probably have a different network range)

Now all the clients on my LAN can access my LAN based servers using their external IP address so I can have my DNS only serve up public addresses.