Looking for a transparent and persistent DNS cache

Asked by yason

I am looking for a DNS cache that's very aggressive in storing known resolutions and that remains responsive by not doing outside queries anymore than absolutely needed.

There are many DNS servers in Ubuntu repository, what is your opinion of what might be the easiest way?

I've used pdnsd before with a bit tweaking but in the end it's not satisfactory enough as it's more a proxy than a cache. I would assume the DNS cache to:

- only look up addresses from external domain name servers if 1) it's not found in the cache or 2) the internet connection is up, the cached address is old enough, and nobody is currently querying the name!

- store cached entries on disk automatically

- not flush the cache as nameservers change due to switching networks or starting/stopping VPN services

Thus it would minimise stalls caused by DNS resolution, regardless of whether some name servers are up/down/available/unavailable.

thanks in advance,
S

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
André Carezia (carezia) said :
#1

Dnsmasq is what you need. The package is dnsmasq.

Revision history for this message
Simo Melenius (yason) said :
#2

The dnsmasq didn't seem to work too well; not out-of-the-box nor after making sure that the configuration is more or less sane.

I noticed that:

- dnsmasq daemon did come up
- the correct domain name servers were updated via resolvconf
- to ``dig'' dnsmasq server on localhost answered but dnsmasq never gave out anything in the answer section.

I'm back with pdnsd with some custom tuning but I would like to ask if there's anything special about dnsmasq in order to make it work? I'd like to try it out again.

I have a vanilla Ubuntu 8.10 setup, with connections coming up via NetworkManager (both ethernet and wireless) and network-manager-vpnc. DNS's are dynamically managed via resolvconf which sure works for other dns software.

Can you help with this problem?

Provide an answer of your own, or ask yason for more information if necessary.

To post a message you must log in.