Automatically get nameservers
Lowell Gilbert
freebsd-questions-local at be-well.ilk.org
Wed Jan 10 20:09:39 UTC 2007
"George Vanev" <george.vanev at gmail.com> writes:
> I installed isc-dhcpd and it is working fine.
> But I don't want to hardcode the nameservers in the dhcpd.conf,
> because my ISP is changing them sometimes.
> It would be perfect if there is a way dhcpd to read the nameservers
> from /etc/resolv.conf
Not exactly, but you can have the dhclient rewrite the dhcpd.conf when
it gets new nameservers. I used to do this; I ran it from
dhclient-exit-hooks, and it was a simple sed(1) command. For a long
time, I've been running my own local caching nameserver, and directing
the DHCP clients to that, but I could dig out my old script if you
have trouble with it. Although I would suggest you also consider
setting up your own local caching nameserver; the caching behaviour
can be a noticeable speed boost.
More information about the freebsd-questions
mailing list