dhcp periodicall effectively empties /etc/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dhcp (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Kubuntu 7.10
My DSL connection works fine for 1/2 to 1 hour or so then suddenly it cannot resolve any names to IP addresses.
My investigation showed me that between /etc/ppp/
When all is good:
/etc/ppp/
nameserver 1.2.3.4
nameserver 2.3.4.5
/etc/resolv.conf
nameserver 1.2.3.4
nameserver 2.3.4.5
search lan
After the failures set in:
/etc/ppp/
nameserver 1.2.3.4
nameserver 2.3.4.5
/etc/resolv.conf
search lan
nameserver 10.0.0.138
Once I found this, I went in and edit /etc/resolv.conf to make it good again, everything comes back to normal.
Adding name servers by prepend option in /etc/dhcp3/
I consider this a bug in /usr/sbin/dhcdbd. It shoud have an option to not disturb it if a lease is live.
Um, alternatively, if your /etc/resolv.conf gets changed automatically, you can prevent access to modifying it (Even root can't modify) by giving:
sudo chattr +i /etc/resolv.conf
(You can undo this by manually giving -i later, if you need something changed within)