How to change DNS provider in Linux

Filed under: by: Keym4k3r

Recently my ISP had some problems with the name servers, and
I had to wait almost a minute to get DNS response. Then the rest was OK.
So I changed DNS server to Open DNS and everything went back to work.
This is free DNS provider that offers some kind of site filtering, so some bad sites could be blocked from browser view.
On the other hand when your DNS server is outside Internet Provider , you have to be careful, as that server could be compromised, and gives you false name resolving, thus redirecting to fake, dangerous sites. That could also happen with your ISP server, yet in that case you can claim the damages to the provider, that is not the issue with the free service.

How did I do the change.

In the /etc/resolv.conf file I changes entries to :

nameserver 208.67.222.222

nameserver 208.67.220.220

then saved the file. The internet connection was still on, and the next DNS question
has been directed to Open DNS. Bingo.

[ Open DNS is used for the example, there are other free DNS providers, also the changes may be slight different in various Linux distributions.]

0 comments: