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

Robert Brockway rbrockway-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org
Mon Jun 13 14:31:18 UTC 2005


On Mon, 13 Jun 2005, Lennart Sorensen wrote:

> dhclient has options for dhclient.conf to make it not touch resolv.conf,
> pump and dhcpcd both have command line options to leave resolv.conf
> alone.

If all else fails there is always chattr if the filesystem supports it.

Some years ago I had to deal with a closed-source connection binary (for 
Linux) for a propriatory protocol used for connection to the ISP (amazing 
huh).  It insisted on changing /etc/resolv.conf, gave no option to disable 
this behaviour and would even ignore a chmod and change the file anyway.  

In the end I made /etc/resolv.conf immutable using chattr[1].  Ext2/3 and 
recent version of XFS support chattr functionality.

[1] chattr +i

Rob

-- 
Robert Brockway B.Sc.
Senior Technical Consultant, OpenTrend Solutions Ltd.
Ph: +1-416-669-3073 Email: rbrockway-wgAaPJgzrDxH4x6Dk/4f9A at public.gmane.org http://www.opentrend.net
OpenTrend Solutions: Reliable, secure solutions to real world problems.
Contributing Member of Software in the Public Interest http://www.spi-inc.org
--
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