Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having troubles setting up a LAN DNS server.

I have multiple devices on a network and I would like my domain name to work on the LAN via any of those devices.

The DNS server resides on the same machine as my webserver, a mac mini with Snow Leopard. When I remotely connect via ssh using the LAN IP address, in order to check the DNS, both forward and reverse lookups worked, using the commands "nslookup", "dig", "dscacheutil", and "host" (though I had to remove the entry in the hosts file in order to have it give off the same address as nslookup and dig).

All other DNS look ups are to be done by the DNS servers specified automatically in my modem.

My router is an ASUS RT-N53 and my modem is a Prestige 660ME-61. So far, I have tried adding the DNS server to the DHCP settings on the router, but if I refresh Safari on an iOS device, it will no longer resolve to the correct node, even though it worked after a reboot (the only way to flush the dns cache in iOS).

The domain only works for a short time on my laptop before it switches to the public IP address, which sends me to my modem's web interface. I have NAT loopback enabled, which I had to do through telnet, and tried bridge mode, which disabled my Internet access.

The server gets its address via DHCP, which is a reserved address. When I looked at the DNS servers on my Mac, my router's LAN IP came before the DNS server's LAN IP, just like it comes before the modem's LAN IP address. I cannot have it come first on the list unless I edit the DNS server settings.

As there are more portable devices accessing this network, it would be best to avoid manually plugging in the DNS server IPs. As for the server, nothing needs to be changed since the only DNS server it recognizes is on the loopback IP address, as I edited the DNS server setting there to have that as its only DNS server lookup.

share|improve this question

migrated from serverfault.com May 29 '12 at 17:55

This question came from our site for professional system and network administrators.

11  
Please use paragraphs. It's as if your SF question was using jumbo frames. –  gparent May 29 '12 at 16:27
    
I feel this isnt an appropriate question for SF as its clearly a home network, but the guy has a valid question, please move to Super User –  Sirch May 29 '12 at 16:54

1 Answer 1

If you have setup a DNS server and can issue nslookup commands remotely and you get the correct answer the DNS server is functioning properly. Typically you would set the DHCP option for DNS to point to your DNS server.

If you want your internal DNS server to resolve external requests (outside of any zones you have created) you will want to setup a DNS forwarder on your DNS server. Essentially all requests that your DNS server is not authoritative for will be forwarded to the specified server.

Hope that helps / makes sense

share|improve this answer
    
I have tried setting the DNS option via DHCP in the router, but it does not always recognize the only domain on my internal DNS server, probably because the router's IP is the first in the list of DNS servers on my Mac, as I specified already. I have thought about setting it in my Modem's DHCP server, but I'm not too sure if I can use the address range used by my router, or if I have to use my modem's IP address range, since I had to disable bridge mode to post the question. The lookup stuff was done over SSH. Thanks for trying to help though. –  bryce May 29 '12 at 17:08
    
Ah ok, yes many consumer routers run and hijack DNS requests. You will need to find a way to either disable your router's DNS function or use a different router. That is unless you can configure your router's DNS records. DD-WRT is a good option, not sure if your router can run it though. en.wikipedia.org/wiki/DNS_hijacking –  Brent Pabst May 29 '12 at 17:11
    
I looked up my router awhile back and it does not support any other firmware. I could not find the original page, or what I about to link to could be the original finding, but that is what the following page says. infodepot wiki –  bryce May 29 '12 at 17:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.