James John – Software Engineer

This Python Program will Set your DNS Servers in /etc/resolv.conf Accordingly

Etisalat Mobile Communication Network blocked OpenDNS Server which turns out to be the server I use most. So each time I connect to Etisalat, I will go to edit my /etc/resolv.conf and set it to Google Public DNS. Been doing this for months and I told myself, why not write a program to check this for you? Then I came up with this program, this program not only check for up servers but arrange them base on their response time.


Fastest-DNS is a Linux package written in Python, which checks DNS servers in /etc/resolv.conf, check for the fastest and arrange them by their speed. Making fastest one the primary server for faster nameserver resolving

How to Use

Fastest-DNS is still on GitHub, so you just clone or download it

$ git clone https://github.com/donjajo/fastestDNS.git

After cloning, start by typing:

$ sudo ./fastest-dns

This will automatically check DNS servers in /etc/resolv.conf and organize them based on their response time.

To ignore testing of local server, add a -i 1 parameter and to specify custom domain to use as testing, pass the -d parameter. Example:

$ sudo ./fastest-dns -i 1 -d donjajo.com

Get it on GitHub


James John

Software Engineer