Custom DNS settings lost on reboot with Ubuntu

I run my own DNS server for my domain, and today I was trying to figure out why on earth my Ubuntu 8.10 machine would not persist the DNS settings I specified after a reboot.

Having my own DNS allows me to refer to machines on my local intranet via their machine name, not their IP (which is dynamic and allocated via DHCP). Any DNS lookups not on my domain get forwarded to my ISP's DNS. All this works fine for Windows machines on the domain, but Ubuntu wasn't playing nice. Every time I changed the settings via System->Preferences->Network Configuration, the details in /etc/resolv.conf would only stick around until the next reboot; at which time the network manager reset everything.

I initially thought this was an issue with Ubuntu, as threads like this seemed to indicate, but it turns out that the problem was with my DHCP server. I had configured my DHCP server to specify both IP and DNS settings to computers. These settings were overriding those specified on Ubuntu. So all I had to do to fix this was configure the DHCP server to include my DNS server in its list. Thats it, no custom DNS entries required.

Ubuntu Network Manager

Now of course you can debate whether the Ubuntu network manager should have warned me when I tried to ask it to use "Automatic DHCP (addresses only)" while my DHCP server was specifying DNS as well, or whether it should have actually overridden the DNS settings outright; But unfortunately it didn't do either.

Submitted by Armin on Wed, 2009-04-22 23:54

User login

Syndicate

Syndicate content