Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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).

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
Awesome, thanks! if you leave out the -IFACE, it apparently works for any interface. – obvio171 Feb 2 '10 at 4:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .