Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just flashed DD-WRT to my Linksys e4200 and I'm exceptionally pleased with it. I would like to use DNSMasq to cache DNS resolutions, forward results it does not have in its cache to Google's public DNS, and resolve local lookups. I have ensured that both of the Use DNSMasq for DHCP and Use DNSMasq for DNS options are checked and I have ensured a large cache-size with cache-size=10000.

However I need to set up forwarding to Google's public DNS and also set up local name resolution:

  • To set up forwarding to Google, I can specify IP addresses in the three Static DNS fields in the DHCP section of the basic setup.
    • If I choose this process than do I need to specify my own router as the first Static DNS with or, or not?
    • If I don't have to list my own router as a Static DNS then what do I put in the last field? Another DNS provider like OpenDNS?
  • I think I can also specify DNS with a server= and server= option in the Additional DNSMasq Options box in the Services tab.
    • Again do I have to specify my own router first as a server in order for it to use the local cache with server= or server=

Does it matter which of these methods I use?

Now concerning host names and local DNS. I am having issues getting names to resolve to local IP addresses. I have seen really simple tutorials instructing that all one has to do is to enable local resolution with the Use DNSMasq for DNS option, and then specify names/IP addresses in the /etc/hosts/ file or by adding lines in the address=/hostname/ format to the configuration options box in the Services tab. Apparently the Local DNS option in the DNSMasq options section in the Services tab actually does not have anything to do with DNSMasq, at least according to this post. Does it matter if I either specify IP to host name mappings in the /etc/hosts file or with the address=/hostname/ option in the Additional DNSMasq Options box? I cannot at this point get even the two entries already present in the host file to resolve let alone any other's I specify in the options box. This tutorial makes it sound very easy, should it work just like that? Is there something I am missing?

Thanks so much for your assistance! Please let me know if there is more information that you need!

share|improve this question
up vote 1 down vote accepted

So the stumbling block for me was the domain being used. It was set to WAN, which would force all of the machines into the WAN domain, and not a local LAN/WLAN domain, preventing lookups like hostname.local from working. Simple as that!

share|improve this answer

You needn't supply more than one DNS server if you don't wish. As well, you ought not to enter your own server; if the name is cached, the server will hand it out; if it doesn't have the name cached, then it will go to one of the servers you've configured, if all's as you say.

Your DHCP server, however, should provide your internal DNS server's IP (not so that your LAN's clients can take advantage of your local name server.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.