Linux Notice App

Open dns ,google dns

 


Open dns adress: 

208.67.222.222,208.67.220.220

Google dns:


8.8.8.8,8.8.4.4

The file that holds the Nameserver information is resolv.conf under etc. First we open the terminal with ctrl + alt + T combination. We will edit this file via nano on the terminal we opened, and then lock it to keep it unchanged.

To open with admin privileges in the terminal

# sudo nano /etc/resolv.conf

We are writing. After writing the admin password, we write our own nameservers on the nano page. My preference is for GoogleDNS. Of course, you can find dozens of alternatives, or even make one of your own machines. The choice is yours.

nameserver 8.8.8.8
nameserver 8.8.4.4

After adding nameservers, we save and exit via nano with ctrl + O. If we leave it at this stage, our resolv.conf file will revert to the default values ​​in the next session. As a matter of fact, we need to lock this shape against writing to keep it.

# chattr + i /etc/resolv.conf

After making it permanent, we're done and can use our new DNS with peace of mind.

Another way:
After writing open dns numbers in the resolv.conf file,
Code:
sudo chattr + a /etc/resolv.conf

This command makes the resolv.conf file write-protected. After that command, root cannot even make changes to that file.

To make changes to the file, you need to remove the lock. And this
Code:

sudo chattr -a /ect/resolv.conf

command. This removes the lock on the file and is writable by root.

No comments

Powered by Blogger.