Home > debian, linux, ubuntu > Speeding up DNS lookups with dnsmasq

Speeding up DNS lookups with dnsmasq

December 5th, 2009 admin Leave a comment Go to comments

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à

Categories: debian, linux, ubuntu Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.