Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have configured dnsmasq (see https://wiki.debian.org/HowTo/dnsmasq) but it doesn't seem to do what I expected. Its cache is somewhat working, so that when I for example do dig ubuntu.com twice, first time it takes some time, second time it's instant.

But when I do this a moment later, or after my secondary dns server is changed (I connect to vpn or something) all records seem to wipe out.

Is there a way to set up some proper, working dns cache, that doesn't forget everything in a moment, but keeps its data for at least several days? so that even if I disconnect from network, I could still resolve hostnames I tried to resolve before?

dnsmasq improves the caching "a little bit" I would like to improve it significantly

share|improve this question
What version of Ubuntu are you running? –  MadMike Oct 11 '13 at 7:08
this is rather a general question, it's ubuntu 12.04 but it works same on debian as well as any other linux distribution... this is just how dns masq works –  Petr Oct 11 '13 at 7:10
I ask because Ubuntu 12.04 installs DNS-caching by default –  MadMike Oct 11 '13 at 7:13

Your Answer


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

Browse other questions tagged or ask your own question.