≡ Menu

How to change to OpenDNS or Google Public DNS on Linux?

OpenDNS and Google Public DNS are two main publicly available free DNS services. Both provide an excellent, fast recursive DNS resolution service which also has several security features built in. Which one to use is up to you. You should try both and see which one gives you the fastest DNS service.

On a Linux based system (Fedora/CentOS/Debian/Ubuntu/FreeBSD), there is a file called resolv.conf. This file contains a list of all the name servers that the system uses for DNS resolution.

Open a terminal windows (SSH or local) and type the following command:

cat /etc/resolv.conf

This will output something like the following:


These are the name servers currently used by your system. To change them, simply change the IP addresses to the name servers of OpenDNS or Google Public DNS.

What are the IP addresses of OpenDNS?

OpenDNS uses the following IP addresses:

What are the IP addresses of the DNS servers of Google Public DNS?

Google public DNS uses the following IP addresses:

Comments on this entry are closed.