My tweet you just read says the long story short. In case you didn’t come across, Google made DNS a buzzing topic again with Google Public DNS. So I felt like trying a dns cache again. The logic is “If a better DNS server makes things better, DNS cache makes it even better.”
This is more of a note to self than a HOWTO. If your use case atches with mine, feel free to use this.
My use case: I use an HSDPA, mobile broadband connection on Ubuntu 9.04 Jaunty Jackalope.
Install pdnsd with,
$sudo apt-get install pdnsd
Now launch the text editor you hate and add following to /etc/pdnsd.conf
(By default all the parts are commented so just adding this was fine enough for me)
ip=188.8.131.52 , 184.108.40.206;
min_ttl=15m; // Retain cached entries at least 15 minutes.
max_ttl=1w; // One week.
timeout=10; // Global timeout option (10 seconds).
I copied this piece from here and edited ;). Added the global field because defaults were not cool enough for me. And in ip field I’ve put respectively OpenDNS and Google DNS addresses. You can just add one address there. ‘man pdnsd.conf’ will teach you more about the content in the file.
Once you are done editing the configuration file restart pdnsd with
$sudo /etc/init.d/pdnsd restart
Now you should tell the network manager to look for pdnsd for it’s DNS needs.
Right click network manager icon and then follow Edit Connections > Mobile Broadband and choose to edit your preferred network connection.
In Editing <Your Network Connection> dialog box,
 Choose IPv4 Settings tab
 Choose Automatic Addresses (ppp) Only in Methods Dropdown box.
 Set DNS Servers field to 127.0.0.1 (which refers to pdnsd in our case)
And obviously, Apply Changes :P .
If everything went fine, you are now ready to enjoy DNS cache goodness with pdnsd.
You can check how good is it with dig command.
run this command twice and compare Query time field.
Note: If you followed all the steps but still it doesn’t work, try restarting pdnsd. If you get following error refer this page
/etc/resolv.conf must be a symlink
Update: Added the global settings for config file.