2

I am using a local (company) network which provides some servers which are also available from the outside (through one public static IP and port forwarding). And there are some domains which are pointing to the public IP.

What I want is my domains pointing to the local IPs when being inside the local network. I know I will need a local (internal) DNS server which changes the domains to the IPs. I am able to setup the DHCP server to deliver the DNS to the local clients (so this won't be any problem).

What kind of DNS server software can I use to:

  • repeat all domains like a DNS would do that
  • but for only my domains use the local values
1

1 Answer 1

5

This is all about DNS resolution, and forwarding. :)

  • Setup an internal DNS server.
  • Set the DNS server to forward all unknown requests to an outside DNS server (like Google's or your ISPs).
  • Setup DHCP to give LAN clients the internal DNS server as their DNS server setting.
  • In the internal DNS, setup a domain zone (domain.com) or host-specific zones (machine.domain.com) to cover the hosts/domain in question, using their internal IP addresses.

Now when the LAN clients make a DNS request it will ask the internal DNS server for the IP. If it has that host/domain entry, it will resolve and return the local IP, if it doesn't recognize the requested host/domain it will be forwarded to the public DNS for resolution.

2
  • Sorry, just used the wrong word in the last 3 lines. Meant DNS of course! Fixed it. ;)
    – miho
    Mar 27, 2014 at 21:16
  • Yes, that is what I would it expect it to work. But I wasn't sure if the DNS will use the local ones or the remote DNS entries when there exist both (on the remote DNS the 'correct' DNS for outside access and the 'local' DNS for inside access).
    – miho
    Mar 27, 2014 at 21:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .