/etc/resolv.conf loses nameserver lines

Asked by y-man

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/resolv.conf and /etc/resolv.conf the relation is as follows:

When all is good:
   search lan

After the failures set in:
   search lan

Once I found this, I went in and edit /etc/resolv.conf to make it good again, everything comes back to normal.

Now, my question is what may be the cause of this?
And how can I fix it, short of doing this patching job every time Firefox hicks up.


Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Qwerty Maniac (qwertymaniac) said :

Do you use DHCP?

If so, try this:
sudo gedit /etc/dhcp3/dhclient.conf

Add a line at the end like:
prepend domain-name-servers,;

Save and close and restart your network. See if the earlier conflicts happen again?

Revision history for this message
y-man (yavuz-teksavvy) said :

Just poff then pon, did not do the trick. After an hour or so, file reverted to the effectively empty state.

Tried to restart dhcdbd, this too did not help.

After next re-boot I will watch again.

Revision history for this message
y-man (yavuz-teksavvy) said :
Revision history for this message
Clóvis Fabrício (nosklo) said :

Do you have another network interface? Is it on some 10.x.x.x network? Can you try disabling all other network interfaces and see if problem persists?

Revision history for this message
jaikzelf (jaikzelf-operamail) said :


better late then never...

I had the same on Ubuntu 6.06 and finally sudo chmod /etc/reslov.conf to -r--r--r-- i.o. -rw-r--r--
after I had changed the nameserver's IP-#.
That way I could use names as URL i.o. numbers.
Hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask y-man for more information if necessary.

To post a message you must log in.