Unbuntu Local DNS Cache

August 20, 2010

I had trouble with very slow DNS resolution on Ubuntu 10.04. After trying various fixes in forum posts, none of which had any effect, I opted to install a local dns cache: dnsmasq

To install:

$ sudo apt-get install dnsmasq

Next, edit /etc/dnsmasq.conf and change the listen-address line to be:


Edit /etc/resolv.conf and add in the local ip address at the top of the file:


Finally, restart dnsmasq:

$ sudo /etc/init.d/dnsmasq restart


Tags: dnsmasq ubuntu dns