inside the mind of a linux admin

Find the fastest DNS resolver near you

I recently stumbled upon an awesome tool called Namebench. Namebench it’s a small program wrote in python that search for the fastest DNS server near to you. Namebench runs benchmarks using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation. Namebench is completely free and does not modify your system in any way. It’s currently a “Google” project.

The source are available on the official site, as wrote this is a python program so you should be able to run it from the command line without any additional package, if you want also the GUI you need also the package python-tk, this is usually available in all the main repositories of the principal distributions.

On Ubuntu 11.04, you can easily install it with:

$ sudo aptitude install namebench
The following NEW packages will be installed:
blt{a} namebench python-dnspython{a} python-graphy{a} python-jinja2{a} python-tk{a} tk8.5{a}
0 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,234 kB of archives. After unpacking 11.1 MB will be used.

Run it from any command line or with a launcher. The nameservers field will already be populated with your current DNS servers taken from your resolv.conf.

In Query Data Source you can choose where to take the DNS names to be tested, from your browser history, Top 2000 Alexa sites or do other latency tests.

Once you have selected your options just click on Start Benchmark and wait, it took around 10 minutes on my computer to run all the the tests. For geeks, you’ll want to run this in a terminal and watch the output. At the end you’ll have a page with all the results and some nice graphs, but you are just interested at the information at the top. On the left you can see an estimation of how much you can gain in using the DNS server listed on the right side.

Now, modify your configuration…

Now that you know which DNS server to use you just need to change your resolv configuration file. On a terminal, simply edit /etc/resolv.conf.

In this file put the same IP addresses that tested best in the results of your benchmark, something like:


Related Posts

synergy: How to enable crypto (encryption) and generate SSL certificate

The newer Linux versions of the popular mouse/keyboard sharing application “synergy” now has built in encryption. Here’s how to configure it: Just simply passing the –enable-crypto flag on your synergy server without having a proper SSL certificate will result in the inability to connect to clients and generate an error message similar to this in […]

Read More

Change Number Pad Delete (dot) key from a comma in Ubuntu Linux

I recently purchased a new keyboard and updated to the latest Ubuntu, I’m also an avid user of the number pad for quick input when dealing with spreadsheets or accounting. I found that my num pad’s delete key (“.”) was outputting a comma (“,”) instead. Pretty annoying? I agree, but this can be very easily […]

Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tweeter button Facebook button Myspace button