Restoring /etc/resolv.conf after a modem/router burp

interlug-list interlug-vSRlqIl1h/9eoWH0uzbU5w at public.gmane.org
Sun Jun 12 22:13:04 UTC 2005


On Sun, 2005-06-12 at 17:46, Alex Beamish wrote:

> Every once in a while either the modem or the router (Netgear RP614)
> goes burp and my /etc/resolv.conf gets overwritten with Sympatico's
> two name servers. 

Probably because dhcp is getting the name server and gateway information
from Sympatico dhcpd when you reconnect after the hiccup.  If you
disable dhcp, and preset the name servers then you'll be okay until the
next time sympatico changes the name servers (or the next time the
sympatico name servers go down).  That happens a lot, so you probably
want to leave dhcp on.  

> When that happens, I have to go back into
> /etc/resolv.conf and add in the definitions to get name service
> working with my employer's LAN again.

Right.  The dhcp client doesn't know that you want to keep nameserver
{atwork} when you pick up the dhcp stuff from sympatico.  

> Now, OpenVPN comes up right away, so I could use just the IP
> addresses, but name servers were invented for a reason -- so you
> wouldn't have to remember if that server was 192.168.0.123 bu instead
> was foo.bar.com.

#/etc/hosts
# add the next line
192.168.0.123  foo.bar.co

Now the name server settings don't matter.  Hosts will remember where to
look for foo.bar.co 


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list