/etc/resolv.conf newbie

Jason Vas Dias jvdias at redhat.com
Tue Oct 25 17:45:26 UTC 2005


On Tuesday 25 October 2005 01:31, Sylvan Andrew wrote:
> Hello,
> 
>  Could anyone please tell me what is the best way to have a DNS server's own 
> /etc/resolv.conf configured ? Do you put it's own IP address at the top 
> followed by public DNS / other DNS servers ? Or do you do it another way or 
> order  ?
> 
> Thanks so much !!!
> 
> Regards
> 
> Sylvan 
> 

named operation is unaffected by the contents of /etc/resolv.conf.

With a properly configured named, you should need NO 'nameserver ...'
entries in /etc/resolv.conf - this is equivalent to having only one
'nameserver 127.0.0.1' entry in resolv.conf .

If your nameserver cannot reach the root nameservers on the public 
internet, then you need to put the nameservers returned by your ISP / DHCP
in the named.conf 'options { ... forwarders { a.b.c.d; w.x.y.z; };  ...};' clause,
where 'a.b.c.d; w.x.y.z;' are the domain-name-servers IP addresses returned by DHCP.

If the nameservers returned by DHCP are authoritative for zones not in the public
DNS (ie. they are for a corporate intranet or VPN ), then you need to create forwarder 
zones in named.conf for each such zone in the DHCP 'domain-name' list, ie. the 'search'
list of your resolv.conf, ie. named.conf should contain: 
' zone "my.vpn.zone1.net." IN { type forward; forwarders { a.b.c.d; w.x.y.z; }; }; '
' zone "my.vpn.zone2.net." IN { type forward; forwarders { a.b.c.d; w.x.y.z; }; }; '
if your VPN DHCP server returns the domain-name option of 'my.vpn.zone1.net my.vpn.zone2.net'
and the domain-name-servers option of 'a.b.c.d; w.x.y.z;' .

There is a tool to do this automatically for Linux systems: NetworkManager :
    http://people.redhat.com/dcbw/NetworkManager
The latest version, with Red Hat BIND 9.3.1-14+, will tell named to add forwarder zones
dynamically for VPN / private intranet zones.

Jason Vas Dias,
Red Hat BIND package maintainer
Red Hat Inc.




More information about the bind-users mailing list