Can BIND on vpn use name servers assigned via DHCP by ISP?

Mark Andrews Mark_Andrews at
Thu Feb 8 01:33:09 UTC 2007

> In article <eqcvf4$283h$1 at>,
>  "Jorge Canas" <jcanas2000 at> wrote:
> > Hi,
> > 
> > I have setup a home gateway (2 ethernet cards, one on the WAN and the other
> > on my private network (vpn)).
> > 
> > The WAN interface gets configured via DHCP from my ISP.  The ISP also 
> > provides the addresses of its primary and backup nameservers. I believe 
> > these get written into /etc/resolv.conf
> > 
> > The VPN interface has a private static IP address, and a local DNS server 
> > runs off this interface for the rest of the clients on the vpn.
> > 
> > Anyway, so far, this a very vanilla setup.  But I am not sure how to make 
> > the local DNS forward every query it receives to the nameservers that appea
> r 
> > in /etc/resolv.conf
> > 
> > Anyone know how to configure the local DNS to do that?  Caching on the loca
> l 
> > DNS would also be nice, but the forwarding bit is more important to me righ
> t 
> > now.

	named always caches.  Why do you need to forward?  Nameservers
	work better if that don't use forwarders.  People tend to
	over use forwarders.  Unless there is a reachability problem
	which is addressed by using a forwarder I would recommend against
> named doesn't make use of resolv.conf, it uses the "forwarders" option 
> in named.conf.
> You could run a cron job every minute that checks whether resolv.conf 
> has changed, and if so it copies the servers into the forwarders option 
> of named.conf and runs "rndc reconfig".

	Or hook it into something into your dhcp client.
	e.g. dhclient-exit-hooks if you are running dhclient.

> -- 
> Barry Margolin, barmar at
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at

More information about the bind-users mailing list