UNIX System Administration Handbook - Evi Nemeth [288]
Table 16.18 summarizes the important filenames and locations for HP-UX.
Table 16.18 BIND files in HP-UX
HP-UX has well-commented sample files for just about everything in the directory /usr/newconfig, but nothing for name service. Earlier versions of HP-UX (pre-11.00) put sample named.conf files, zone files, and resolv.conf files in /etc/newconfig. The /usr/newconfig directory seems to be a generalization of /etc/newconfig, but the switch to a better, more complete set of samples somehow overlooked the BIND files. Let’s hope they come back when HP-UX switches to BIND 8 or BIND 9.
HP-UX provides some tools to help you transition from the flat hosts file to DNS resource records. The command hosts_to_named converts from /etc/hosts format to DNS resource record format. sig_named can be used to send signals to named; it is just a friendly front end to kill with arguments similar to those of ndc.
Specifics for Red Hat Linux
Red Hat Linux 6.1 ships BIND 8.2 with the files in the standard spots; see Table 16.19. If you are running Red Hat 6.2, check the table in the FreeBSD section, as it too uses 8.2.2-P5. Red Hat uses the Solaris-style switch file, /etc/nsswitch.conf, to prioritize the various sources of naming information. (The man page is filed under nsswitch rather than nsswitch.conf.)
Table 16.19 BIND files in Red Hat Linux
a. The directory specified in /etc/named.conf as the home for BIND files
Without an nsswitch.conf file, Red Hat defaults to the following scheme for hosts:
hosts: dns [!UNAVAIL=return] files
The !UNAVAIL clause, which the man page says is the default, seems wrong. It’s also contradicted by the sample file that is shipped with Red Hat, where the hosts line is:
hosts: db files nisplus dns
We recommend promoting DNS and using the configuration
hosts: files dns
Red Hat has some sample configuration files, but they’re just in /etc instead of a special directory. The comments are pretty good. named.conf has no man page.
Specifics for FreeBSD
FreeBSD 3.4 and 4.0 include BIND 8.2.2-P5. A service-order file called /etc/host.conf controls the order of services for host lookups only. The possible sources of host information are listed on separate lines in the order you want them to be consulted:
# First try the /etc/hosts file
hosts
# Now try the name server next.
bind
# If you have YP/NIS configured, uncomment the next line
# nis
If the host.conf file does not exist, DNS is consulted first. If that fails, /etc/hosts is consulted. FreeBSD has moved named.conf from the /etc directory to /etc/namedb. Table 16.20 summarizes the relevant filenames and locations.
Table 16.20 BIND files in FreeBSD
a. The directory specified in /etc/namedb/named.conf as the home for BIND files.
/etc/namedb contains some sample files: a root cache file (named.root), a prototype for the localhost reverse zone file (PROTO.localhost.rev), and a shell script called make-localhost that prompts for your domain name and then makes a correct reverse localhost zone file from the prototype.
The named-bootconf Perl script in /usr/sbin converts from BIND 4’s named.boot to BIND 8’s named.conf startup file.
In our opinion, moving named.conf out of /etc should be a punishable offense; we suggest that you link it so that both names work. In looking at the comments at the bottom of the sample named.conf file, we guessed that FreeBSD originally intended to run named in a chrooted environment. However, the default configuration does not actually do this. See the named_* variables in /etc/defaults/rc.conf for more information.
FreeBSD’s named man page is wrong about certain paths, such as those of the statistics file and the dump database. It’s probably wrong in the distribution from isc.org, since Solaris and FreeBSD both have the same errors.
1. The reverse zone might be maintained