Speeding up DNS lookups with dnsmasq
Speed up DNS lookups by using dnsmasq as a DNS cache:
First install dnsmasq: sudo apt-get install dnsmasq
Update /etc/dnsmasq.conf to include: listen-address=127.0.0.1
Update /etc/dhcp3/dhclient.conf to include: prepend domain-name-servers 127.0.0.1;
Finally, edit /etc/resolv.conf and add: nameserver 127.0.0.1
Test DNS caching:
1. dig google.com 19 msec
2. dig google.com 0 msec!!!
VoilÃ