Using free public DNS servers

Why choose to use a public DNS Server

The DNS is an essential part of the internet, it translates hostnames such as into IP addresses DNS also plays an important role for routing emails.

A fast and reliable DNS Service is important when surfing the web. Every time you load a complex web pages containing dozens of images and links, your web browser sends a request to translate these machine names into IP addresses, before the pages are loaded.

These big Public DNS services use a network routing mechanism called anycast to send your requests to a server close to you, lowering the latency of the responses. A DNS with a lower latency can cut your page download by a few seconds.

Some services offer filtered DNS services restricting access to pornographic and malicious web sites, offering a safer internet experience for your family. Check the DNS service website for more details on these features. Also by using a public DNS you take advantage of the cache. For popular sites, chances are that someone has made a request before you and the information that is served to you comes directly from the cache.

For all these reasons it is important that you run your own tests to choose the best based on your location and needs.

Free public DNS list

You can find the code I used to collect these data on Github
ProviderIP addressesAvg. Speed
Comodo Secure DNS8.26.56.26,
DNS Advantage156.154.70.1,
Norton ConnectSafe198.153.192.40,

Setting up your host.

Posix systems.

Here are the steps to configure any POSIX operating systems such as BSD like systems or Linux. Login as root and follow the instructions below.

Open the file /etc/resolv.conf and replace the IP addresses of the DNS servers by the IP addresses of the service you wish to use.

# vi /etc/resolv.conf

Note: If you add more than three nameserver only the first three will be used.

Home Routers

Your machine is most likely connected to the internet through a router. In that case you need to configure your router to use a public DNS.

If you are using an Apple AirPort use the AirPort Utility tool to configure the DNS servers you want to use.

  1. start AirPort Utility
  2. select the AirPort
  3. click edit
  4. click on the tab Internet
  5. enter the two IP addresses of the DNS server of your choice.

AirPort DNS configuration

To configure other routers you can go visit the great OpenDNS setup page. There you will find hundreds of different routers and how to configure them. Just replace the IP addresses from these examples with the IPs of the provider you wish to use.


You can test your configuration using the command host or dig, for example:

fred$ dig

; <<>> DiG 9.7.6-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20404
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;          IN  A

;; ANSWER SECTION:       1405    IN  A       1405    IN  A       1405    IN  A       1405    IN  A

;; Query time: 53 msec
;; WHEN: Thu Jan  3 23:54:56 2013
;; MSG SIZE  rcvd: 90

Comments !