Home » Home » HOW TO: Setup Public DNS In Ubuntu?

Is your Internet connection make you age old in connecting websites? Here comes an alternate way to connect websites through public DNS service like  Google DNS or OpenDNS. The working principal of public DNS will make your web-surfing experience reliable, faster and safer than DNS server of your ISP.

When you are accessing a site imsudo.com from your browser your computer needs the IP address of the web server hosted for that domain. Generally DNS server of your ISP will resolve the IP address of the website, if you are specifying the DNS server in your settings, then your computer will query specified DNS server to find the IP address of the website.

Why Public DNS?

popular websites and services, such as Facebook, often use a Content Delivery Network (CDN) to route your request to the closest server for their content. They do this via anycast routing or via DNS, by returning the closest server’s address when you perform a DNS query via your DNS server. where your DNS server is located physically can have an effect on the speeds and response times you get from certain CDN’s. Use a DNS server that’s close by.

However, these public DNS servers use anycast routing to provide your with a DNS response from the nearest server, or else they couldn’t provide you with such fast responses and high uptimes. For an instance, when you query 8.8.8.8 from The Netherlands, the server that answers the query is not the same one as when you query from Japan. This may partially compensate the CDN problem.

TOP 10 BEST FREE DNS SERVICE. 

There are bunch of free & Public DNS service which helps you to make your internet experience to feel better,

Level3   :-  Level3 DNS will automatically route to the nearest DNS server operated by Level3 Communications, the company that provides most of the ISPs in the US their access to the Internet backbone. The DNS primary server IP is 209.244.0.3 and the DNS secondary server IP 209.244.0.4

Google   :- Google offers IPv6 & IPv4 public DNS server. The DNS primary server for IPV6 is  2001:4860:4860::8888 and Secondary server IP is 2001:4860:4860::8844

Securly   :- Securly DNS server block adult content by default, including of course X-rated content but also adult oriented pages on websites like Wikipedia, adult themed searches on Google, and more. The primary DNS server IP is 184.169.143.224 and the secondary DNS server IP is 184.169.161.155

OpenDNS   :- OpenDNS offers free and premium DNS servers that block adult content, called OpenDNS FamilyShield. The DNS primary server IP is 208.67.222.222 and secondary DNS server IP is 208.67.220.220

Norton ConnectSafe   :- The Norton ConnectSafe DNS servers block sites hosting malware, phishing schemes, and scams. Use 198.153.192.50 and 198.153.194.50 to block those sites plus those with pornographic content. Use 198.153.192.60 and 198.153.194.60 to block all previously mentioned site categories plus those Norton deems “non-family friendly.”

SafeDNS   :- SafeDNS offers content filtering option in several areas. The DNS primary server IP is 195.46.39.39 and secondary DNS IP is 195.46.39.40

DNSResolvers.com   :- DNSResolvers.com says they do not “alter” the traffic in any way, including correcting “typos and non-existent domains”. The DNS primary server IP is 205.210.42.205 and secondary DNS server IP is 64.68.200.200

OpenNIC   :- OpenNIC offers IPv6 public DNS servers. The DNS primary server IP is 74.207.247.4 and the secondary DNS server IP is 64.0.55.201

Public-Root   :- Public-Root DNS servers is functioning only in the United States.

 

Enough with Public DNS background, Let’s now start configuring Public DNS in Ubuntu.

To get start, open Terminal by hitting ( Alt+Ctl+T ) on your keyboard. when it opens run the following command to open resolver file.

$ sudo gedit /etc/dhcp/dhclient.conf 

To know more about configuration files in /etc folder you can refer this link.

gedit window should popup by loading dhclient.conf, find the bellow line in dhclient and change it to the look like highlighted line below. Google Public DNS primary server IP address is,  8.8.8.8 and the secondary IP address is 8.8.4.4

$ prepend domain-name-servers 8.8.8.8, 8.8.4.4;

public_DNS_resolve

 

Save the file and you’re done. Restart your computer to enjoy fast Internet.

 

The same process can be done via GUI tool. To do that, go to “System Settings —> Network” or Right click Network Manager applet and select “Edit Connections“.

In Edit Connection select the specified tab and select the connection name then click “Edit“. Then select IPv4 settings tab and change the connection method to “Automatic (DHCP) address only” 

Connection_edit

 

Then type Google public DNS in DNS server field and then click save to complete the process.

That’s it, you are ready to go with fast internet.

Hope you enjoyed this article, please feel free to leave your comments and do share.

One thought on “HOW TO: Setup Public DNS In Ubuntu?

  1. Subhajit says:

    Nice. Got my Airtel breoadband connection today, was looking for this DNS fix.
    Thanks buddy.

Leave a Reply

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

CAPTCHA Image

*