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 184.108.40.206 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.
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 220.127.116.11. Once you press enter you will see the google.com page has loaded.
If you have the Ip address like 18.104.22.168, but wanted to know what name that resolves to you can type in the following to a command prompt and press enter:
ping -a 22.214.171.124
It will return pinging dns.google
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.
If you have the Ip address like 126.96.36.199, but wanted to know what name that resolves to you can type in the following to a terminal and press enter:
dig -x 188.8.131.52 +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.
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 184.108.40.206 or 220.127.116.11 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 18.104.22.168 and secondary use 22.214.171.124. If you want to use cloudflare DNS use 126.96.36.199 and 188.8.131.52.
If you want to change it at the machine level then it depends on the operating system.
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 184.108.40.206 and secondary 220.127.116.11 or Cloudflare primary 18.104.22.168 and secondary 22.214.171.124. Click ok.
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 126.96.36.199 and fallback like 188.8.131.52. 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 184.108.40.206 at the router level and 220.127.116.11 on the machine level, that machine will use 18.104.22.168 but the other machines on the router will use 22.214.171.124
Popular public DNS server options
For more information visit 126.96.36.199 — the Internet’s Fastest, Privacy-First DNS Resolver
For more information visit Public DNS | Google for Developers
For more information visit Quad9 | A public and free DNS service for a better security and privacy
For more information visit Setup Guide | OpenDNS
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