I am in need of some assistance figuring out how to set up a DNS on my private WAN network. I currently use a Linksys e4200 wireless router to connect all of my computers, servers, and other devices on a WAN. I would like to be able to set up a name server so that I can talk to all of my servers/computers without having to use IP addresses. As far as I have found I have three options, some of which are more straightforward and clear than others. All of the options I realize will require setting up static IP addresses for any devices I would like to assign a name to:

  1. Edit the host files on all of my machines to resolve my chosen names to specific IP addresses.
    • The issue with this choice is that I would have to do perform this action on all of my devices, and maintaining consistency would be difficult. I could provision all of my devices using Ansible, which would make it much simpler, but I'd ideally like to avoid this route.
  2. Flash DD-WRT to my e4200 and use DNSMasq to run a DNS on the router.
    • I will likely flash DD-WRT to my router even if I don't choose this option, but I would prefer my third choice.
  3. Set up a DNS server running BIND9 to resolve all of my local domain names, and forward unknown names to an external DNS server and cache completed resolutions to external websites.
    • This would give me the most flexibility, practice for performing DNS setups, and is my preferred method.
    • The only issue with this approach is that I have no clue where this DNS server should be in my network, or how to point requests to it without modifying all of my devices to use it's local IP address as their DNS server. Please forgive me if that assumption is incorrect, as I am definitely fumbling around here in this approach. The setup of BIND9 seems like something I could work through, I just don't know where to hook in the DNS server, and I'd love some assistance/advice.
  • What OS are involved?
    – duenni
    Commented Mar 22, 2013 at 10:03
  • Ubuntu Server, Windows 7, Max OSX Mountain Lion
    – LICHEN
    Commented Mar 23, 2013 at 16:48

2 Answers 2


I'd go with the third option, you can place it anywhere you'd like on your network, I usually set networks up in a similar manner, .1 as the router, .2 as the first DNS server, so on. Plus it's easier to type if you're assigning the address to more than a few PCs :)

You will have to add the IP to your machines to allow them to resolve domain names locally, or you could distribute the address via DHCP, if you decided to use DHCP to distribute IPs mapped to MAC addresses, so the same IP will always be assigned to the same computer, meaning it will always have the same hostname, etc. It would probably be less work just to add the IP to whatever method the computer uses for defining DNS server though.

  • This method will totally work for me! However, I actually flashed DD-WRT to my router and I'm very pleased with it, so I'll be using DNSMasq. I'll still play with BIND9 and DNSMasq and other DNS servers on my servers, just for learning purposes, but for actual use I'll be useing DNSMasq on my router for right now.
    – LICHEN
    Commented Mar 23, 2013 at 16:51

If you choose the third option, you do have to change the DNS settings on all your machines. For anything with DHCP, that is a simple change. Anything else should be scriptable. With regards to setting static addresses, yes that is generally advised for your servers. If you want your clients to still recieve DHCP addresses, and also be resolvable through DNS, you can have your DHCP server update DNS. Here is an example: http://lani78.wordpress.com/2008/08/12/dhcp-server-update-dns-records/

You must log in to answer this question.

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