[TriLUG] override dhcp's dns

Matthew Lavigne maillist at shenandoahkennels.net
Sat Jun 19 19:49:30 EDT 2004


> And to make it stick, you'll need to tell your DHCP client not to update
>  /etc/resolv.conf (as it likely will do, next time you acquire a new
> lease).  This varies from distribution to distribution, but generally if
>  you're using the older versions of isc's dhcpcd (ala RH 7.x) you need
> to  pass it an argument of -R to tell it not to update the
> /etc/resolv.conf.  If you're running something like dhclient (RedHat 9,
> maybe newer), you'll need to create a /etc/dhclient-enter-hooks with a
> replacement function for make_resolve_conf(), something like this:
> function make_resolv_conf() { echo; }  On a BSD box you're going to need
>  to add an appropriate parameter to /usr/local/etc/rc.conf to pass the
> right args to dhcpcd or dhclient, depending on your version, etc.  :)
>
> More generally speaking, read the docs for your dhcp client.  :)
>
> Aaron S. Joyner


or set PEERDNS=No in /etc/sysconfig/network-scripts/ifcfg-ethX where X is
the interface that gets the DCHP addresses..  This will prevent the
rewriting of /etc/resolv.conf by the dhclient- remember this so that if
the DNS for the ISP changes you aren't out of luck.

Matthew Lavigne





More information about the TriLUG mailing list