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

Scott Allen scotta-cpI+UMyWUv9BDgjK7y7TUQ at public.gmane.org
Mon Jun 13 11:15:55 UTC 2005


On Sun Jun 12,2005 05:46:46 PM 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. 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.
> 
> 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.

Although you've already gotten a number of suggestions that may work, 
this may also be a possibility:

Provided that you don't have to access too many servers on your 
employer's LAN, and they don't often change IP addresses, you could 
use the /etc/hosts (or equivalent) file on your local machine to 
resolve their addresses, and not use a nameserver for them. That way 
you don't have the nameserver problems and can still use names in 
your applications instead of IP addresses.

You will, of course, manually have to maintain the hosts file. If you 
do this, make sure that your hosts file is used before the 
nameservers, to avoid delays.


-- 
** Scott Allen   scotta-cpI+UMyWUv9BDgjK7y7TUQ at public.gmane.org **
**     Toronto, Ontario, Canada     **
--
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