/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:
/etc/ppp/resolv.conf
   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/resolv.conf
   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.

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.

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Qwerty Maniac (qwertymaniac) said :
#1

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 1.2.3.4,2.3.4.5;

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

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

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 :
#3
Revision history for this message
Clóvis Fabrício (nosklo) said :
#4

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 :
#5

Hello,

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.