Local DNS server

2

1

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

miho

Posted 2014-03-27T18:32:01.270

Reputation: 133

possible duplicate of How to setup intranet DNS to resolve some sub domain address and forwards others?

– Ƭᴇcʜιᴇ007 – 2014-12-04T19:00:46.460

Answers

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.

Ƭᴇcʜιᴇ007

Posted 2014-03-27T18:32:01.270

Reputation: 103 763

Sorry, just used the wrong word in the last 3 lines. Meant DNS of course! Fixed it. ;) – miho – 2014-03-27T21:16:12.553

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 – 2014-03-27T21:18:28.333