Why choose to use a public DNS Server
The DNS is an essential part of the internet, it translates hostnames such as 0x9900.com into IP addresses 149.20.56.139. 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
Provider | IP addresses | Avg. Speed |
---|---|---|
8.8.8.8, 8.8.4.4 | 0.454 | |
OpenDNS | 208.67.222.222, 208.67.220.220 | 0.301 |
Norton | 198.153.192.1, 198.153.194.1 | 0.320 |
Verizon | 4.2.2.1, 4.2.2.2, 4.2.2.3, 4.2.2.4, 4.2.2.5, 4.2.2.6 | 0.516 |
Level3 | 209.244.0.3, 209.244.0.4 | 0.333 |
Securly | 184.169.143.224, 184.169.161.155 | 0.389 |
Comodo Secure DNS | 8.26.56.26, 8.20.247.20 | 0.593 |
DNS Advantage | 156.154.70.1, 156.154.71.1 | 0.614 |
Norton ConnectSafe | 198.153.192.40, 198.153.194.40 | 0.273 |
OpenNIC | 74.207.247.4, 64.0.55.201 | 0.631 |
SmartViper | 208.76.50.50, 208.76.51.51 | 1.586 |
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
nameserver 8.8.8.8
nameserver 8.8.4.4
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.
- start AirPort Utility
- select the AirPort
- click
edit
- click on the tab
Internet
- enter the two IP addresses of the DNS server of your choice.
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.
Tests
You can test your configuration using the command host
or dig
, for example:
fred$ dig ebay.com
; <<>> DiG 9.7.6-P1 <<>> ebay.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20404
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ebay.com. IN A
;; ANSWER SECTION:
ebay.com. 1405 IN A 66.135.205.14
ebay.com. 1405 IN A 66.211.160.87
ebay.com. 1405 IN A 66.211.160.88
ebay.com. 1405 IN A 66.135.205.13
;; Query time: 53 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Thu Jan 3 23:54:56 2013
;; MSG SIZE rcvd: 90