configuration for different networks

Sten Carlsen sten at
Thu Jul 26 16:03:22 UTC 2007

You probably want to check the man pages for "dhclient-enter-hooks".

I have in my dhclient-enter-hooks:
#  /etc/dhclient-enter-hooks
#  This file should stop some of the damage done by dhclient.

function make_resolv_conf() { return; }

function make_ntp_conf() { return; }

The function "make_resolv_conf()" replaces the built-in function that
writes out a new resolv.conf when receiving the packet from the server.

The last function "make_ntp_conf()" is not standard, but made by my self
to avoid dhclient tampering with my ntp.conf. This should be standard
but that is a different discussion.

Jared Greenwald wrote:
> I think I'm losing my mind.
> I have my laptop setup to use dhclient on its wireless interface.  I
> need to be able to connect to my work's openvpn setup.
> I have openvpn setup correctly with dnrd to setup routes to all of the
> internal-to-vpn routes.  In fact, when I just bring everything up from
> boot it works perfectly.
> The problem comes in when dhclient goes to renew its configuration.
> My resolv.conf search lines get overwritten with that of the dhcp
> server on the network.  Also, I lose connections to machines that are
> inside of the vpn network for just a second.  This has the result of
> me bouncing in and out of the irc server inside of the vpn, can't send
> mail, etc.
> I don't really want to keep the search settings for the vpn in
> permanent config since I'm not always connected to the vpn.  But still
> that doesn't explain why I'm dropping the connections to internal
> machines.
> Is there some way to profile the connections such that every time I'm
> in a certain profile, my search lines get setup correctly and my
> connections don't get dropped?
> Any thoughts?
> Thanks,
> Jared

Best regards

Sten Carlsen

No improvements come from shouting:


More information about the dhcp-users mailing list