Friday, 23 November 2018

networking - Local DNS server


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



Answer



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.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...