How can I set the dns servers permanently in Linux? "Permanently" means so that they cannot be changed by my ISP or anyone else. I ask this question because I am having many delays in connecting to websites. I think that maybe the DNS server that is being used on my connection gives low priority to requests from users that run through proxies, which I do sometimtes. I'm hoping that maybe I can find a dns server that does not do that. But, if I can find such a DNS server(s), I'm going to have to be able to force the use of that server.
If you're using Network Manager, go to the "IPv4 Settings" tab, and change "Automatic (DHCP)" to "Automatic (DHCP) addresses only". Then specify the DNS server(s) that you want to use. If you're not using Network Manager, just edit "/etc/resolv.conf" and add "nameserver w.x.y.z" lines. You can also specify DNS servers in your LAN router, but then all machines on LAN will use them.
Thanks to those who answered. MirMir, I tried your solution, or at least one of them. We'll see how it works.
As Mirmir said, just open /etc/resolv.conf as root and replace your ISP's nameservers with your own DNS.
Unless you're using Network Manager, which will overwrite resolv.conf In that case, just do what I said in Network Manager.
Thanks, I never realized this was the case, I'm running OpenSUSE 13.2 Gnome and only connect online via a VPN. I use AirVPN so I've imported the .ovpn config files directly into Network Manager. I was seeing DNS leaks until editting resolv.conf, but nothing since. I have also used the Network Manager method on previous installs/distros with successs.
In order to modify the DNS servers in your router without the ISP changing them, you will also need to modify the admin password on your router in order to prevent the ISP from changing them back to their own DNS servers. -- Tom