Set DNS manually on KDE

1

0

The Network Manager on KDE gets DNS configuration from DHCP and sets it automatically, but I would like to use the Google Public DNS. If I overwrite /etc/resolv.conf with nameserver 8.8.8.8 it still resolves names with the old DNS (probably cached in memory) and, of course, even if it worked, it would be annoying having to do that every time I connect to a network.

I've noticed the Network Manager lets you specify a fixed DNS with the rest being taken from DHCP, but that's on a per network basis, and I would like to set it once for whichever network I connect to (if you're on the go with a laptop that becomes an issue).

Helder S Ribeiro

Posted 2010-02-02T03:23:35.203

Reputation: 5 997

Answers

1

This entry explains static DNS setup which is done on per-interface basis.

Shortly: open or create the configuration file /etc/dhclient-IFACE.conf (IFACE would be eth0 for wired and wlan0 for wireless connection) and append an prepend domain-name-servers NAME.SERVER.IP.ADDR; line for each of Google nameservers.

whitequark

Posted 2010-02-02T03:23:35.203

Reputation: 14 146

Awesome, thanks! if you leave out the -IFACE, it apparently works for any interface. – Helder S Ribeiro – 2010-02-02T04:24:37.480