[Wylug-help] /etc/resolv.conf Being Overwritten
Aaron Crane
wylug at aaroncrane.co.uk
Mon Jun 16 16:29:45 BST 2008
Smylers writes:
> Every minute or so something is re-writing /etc/resolv.conf, with
> National Express's name-server details (as you'd expect it to do when
> connecting). This is tiresome, because I've got a VPN connection
> which added some additional name-servers (and hostname suffixes) to
> that file when it connected, and those got removed whenever the file
> was first re-written.
I observe that NetworkManager on Hardy seems to use dhclient for
obtaining a DHCP lease from the local gateway. Given that, and a
small amount of looking at likely-seeming files under /etc, I'd be
inclined to investigate one or more of the following:
NetworkManagerDispatcher(8), and its files in
/etc/NetworkManager/dispatcher.d
dhclient(8), and its configuration file /etc/dhcp3/dhclient.conf
dhclient-script(8), and its files in /etc/dhcp3/dhclient-exit-hooks.d
and /etc/dhcp3/dhclient-enter-hooks.d
I'd hope that one or more of those things can be persuaded to add to
the DNS resolver data supplied by the DHCP server, so that the
auto-generated /etc/resolv.conf would just magically contain the
right data.
I'm not clear enough on the behaviour of the VPN to be able to give
you a simple recipe, but I hope that helps anyway.
--
Aaron Crane ** http://aaroncrane.co.uk/
More information about the Wylug-help
mailing list