/etc/resolv.conf and your ISP

Glenn Dawson glenn at antimatter.net
Sun May 8 13:13:32 PDT 2005


At 12:49 PM 5/8/2005, Forrest Aldrich wrote:
>I can think of a few ways to resolve this, but I thought to ask here.
>
>I have Comcast for my ISP, and of course DHCP changes /etc/resolv.conf
>during each update -- lately, they've been screwing things up bigtime,
>such that I simply use my own "named" instance.
>
>My question is:  how to reliably keep your own nameserver in
>/etc/resolv.conf, and get around the frequent protocol updates that
>change/nullify your mods to /etc/resolv.conf.
>
>Perhaps just a regular script that does a diff and patch of it, or
>simply copies over the file you want regularly.  Not elegant but it
>would work.

According to dhclient.conf(5):

supersede [ option declaration ] ;

        If for some option the client should always  use  a  locally-configured
        value  or  values rather than whatever is supplied by the server, these
        values can be defined in the supersede statement.


I've never had to use this myself, but I would expect that something like:

interface "foo" {
         ...
         supersede domain-name-servers 127.0.0.1;
         ...
}

would do the trick in your case.

-Glenn


>I also wonder about creating a dhclient-exit script that would update
>certain services automatically when your IP changes.
>
>
>Thx.
>
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list