How to change your DNS

176 0

This tutorial will give some basics on DNS and show you how to change your DNS. By default, your DNS is handled by your Internet Service Provider. There are usually more efficient and secure options out there that could possibly speed up your browsing and make it a little more secure even. Follow along to find out how to change it on your PC or on your Router.

What is DNS?

Domain Name System (DNS) is similar to a phone book in that you have a name (web address) that you want to go to but knowing the name is not enough. You have to have the number (IP Address) to make the call. All devices on the internet have their own IP Address and that is how you reach it. But imagine having to remember a number like 172.217.215.101 for every web page you wanted to visit. Most of us are better at remembering names than numbers. When we enter a name like google.com into a browser it is the job of DNS to find the IP Address for that domain name.

Exercise: Let’s try it

Feel free to skip past this section if you already know how this works.

In this exercise we will be doing a simple ping command to show you how DNS translates the name into an IP address and then show how the IP address and the name resolve to the same place.

On windows:

In your search bar open a command prompt by typing cmd and pressing enter. You should get a window like this:

 

First, we will “ping” the google.com website. Ping is a command utility that allows you to test the connectivity between your source device and a device you are trying to reach. It works by sending a small packet of 32 bytes and you will get a response that tells you how long that it took as well as if any packets were dropped. Type in the following command and press enter. I have added the -n switch to this so you can just get 1 response. If you leave it off, the default it will return is 4 times.

ping google.com -n 1

You should get something like this below. You will notice that it says Pinging google.com followed by an IP Address. The IP address that you see could and probably will be different than what I am showing, because Google will have multiple servers that you could possibly connect to. This is so they can balance the load for a large amount of traffic across different servers. Copy that Ip address and paste it into a browser and press enter. In my case it was 172.253.124.100. Once you press enter you will see the google.com page has loaded.

Reverse lookup

If you have the Ip address like 8.8.8.8, but wanted to know what name that resolves to you can type in the following to a command prompt and press enter:

ping -a 8.8.8.8

It will return pinging dns.google

On Linux:

Open a terminal and type in the following (the -c 1 tells it to only return once. Otherwise, it will keep running until you type CTRL + C):

ping -c 1 google.com

Copy the returned Ip address and paste it into a browser and hit enter. This will load the google.com page.

Reverse lookup

If you have the Ip address like 8.8.8.8, but wanted to know what name that resolves to you can type in the following to a terminal and press enter:

dig -x 8.8.8.8 +short

This will return dns.google.

How to change your DNS

If you have not changed it, it will be the default of your service provider.

However, to check it on a local machine, open a command prompt or terminal and type the following.

nslookup google.com

You will get a return at the top that shows server and address. If this points to a local Ip address, something like 10.0.0.1 then it is showing your router and then if you look in your router it will either show something you have already set like 8.8.8.8 or 1.1.1.1 or it will show it is using your ISP.

To change it you would have to decide at what level you want to change it. Do you want to change it for everything that connects to your router or just one machine?

If at the router level, then open up your interface for the router (this will be dependent on the brand, google it) and look for something like setup. In there you will look for Domain Name System (DNS) address. Select to set the DNS and if you want to use google for the primary use 8.8.8.8 and secondary use 8.8.4.4. If you want to use cloudflare DNS use 1.1.1.1 and 1.0.0.1.

If you want to change it at the machine level then it depends on the operating system.
Windows:
In the search box, type in Ethernet Settings and click on it. On this page you will see a link “Change adapter options”. Click on it.

Find your Ethernet or wifi connection, right click on it and then click on properties. In the box scroll down to Internet Protocol Version 4 (TCP/IPv4). Click on it and then click properties. For IPv6 you would follow the same steps and choose Internet Protocol Version 6 (TCP/IPv6) in the box.

Select the “Use the following DNS server addresses:” and type in your preferred DNS. Some popular examples are google primary 8.8.8.8 and secondary 8.8.4.4 or Cloudflare primary 1.1.1.1 and secondary 1.0.0.1.  Click ok.

Linux:
at the terminal type in sudo nano /etc/systemd/resolved.conf and press enter
Arrow down until you see the #DNS= and #FallbackDNS=
Remove the # sign from the front and after the equal type in your preferred DNS like 1.1.1.1 and fallback like 1.0.0.1. Ctrl + X to save the file.

One thing to keep in mind about DNS is the priority order. It is machine > router > ISP. So, if you set 8.8.8.8 at the router level and 1.1.1.1 on the machine level, that machine will use 1.1.1.1 but the other machines on the router will use 8.8.8.8

Popular public DNS server options

Cloudflare

For more information visit 1.1.1.1 — the Internet’s Fastest, Privacy-First DNS Resolver

IPv4

1.1.1.1
1.0.0.1

IPv6

2606:4700:4700::1111
2606:4700:4700::1001
Google

For more information visit Public DNS  |  Google for Developers

IPv4

8.8.8.8
8.8.4.4

IPv6

2001:4860:4860::8888
2001:4860:4860::8844
quad9

For more information visit Quad9 | A public and free DNS service for a better security and privacy

IPv4

9.9.9.9
149.112.112.112

IPv6

2620:fe::fe
2620:fe::9
OpenDNS

For more information visit Setup Guide | OpenDNS

IPv4

208.67.222.222
208.67.220.220
Final Thoughts

This is a basic tutorial and guide on how to change your DNS at the device level as well as at your router level. There is a lot more to DNS than what is here, but this is meant as an introduction to DNS as well as how to change your DNS from your ISP to a public DNS. There are many reasons you might want to change. Prime among these are speed and security.

Find more on https://notposted.com

Total 0 Votes
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

About The Author

Coolest hedgehog in town!

No Comments on "How to change your DNS"

Leave a Comment

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