Solving the annoying "Disappearing DNS" bug

Sep 21, 2008 16:37

I switched from DHCP to static IP and discovered the "disappearing DNS" bug that plagues Ubuntu. After switching to a static IP, I had to re-enter my DNS settings after each reboot. Not a huge issue, but annoying enough I went looking for an answer.

Open the network interfaces config file:

sudo gedit /etc/network/interfaces

Append the following:

up echo nameserver xxx.xxx.xxx.x > /etc/resolv.conf
up echo nameserver xxx.xxx.xxx.x >> /etc/resolv.conf

(obviously insert the DNS numbers of your choice in place of "x")

After rebooting, I had automatic proper DNS access once again.
Previous post Next post
Up