Bind, a widely used DNS server, can be configured as a caching dns server to speed up slow Internet surfing experience, especially when you’ve low bandwidth. First install bind9 and dns utilities:

sudo apt-get update
sudo apt-get install bind9 dnsutils

Now, simply point your ISP’s DNS server in /etc/bind/named.conf.options:

  [...]
  forwarders {
       10.1.1.11;
  };
  [...]

Now restart the bind daemon: sudo /etc/init.d/bind9 restart

And, point your nameserver in /etc/resolv.conf to your DNS server’s IP address:

vim /etc/resolv.conf
add "nameserver 127.0.0.1" to this file

Finally, test your BIND DNS caching server: dig wikipedia.org

Over the time the query time for most frequent domains will reduce anywhere from 5000msec to 0msec :)



© Rohit Yadav 2009-2012 | Report bug or fork source | Last updated on 30 Nov 2012
Ohloh profile for Rohit Yadav FOSS ITBHU hacker emblem