Creating a named.conf File

1.15.1 Problem

You need to create a named.conf file for a name server.

1.15.2 Solution

Use your favorite editor to create the named.conf file, usually in the /etc directory. Nearly every name server's named.conf file contains an options statement near the beginning specifying the name server's working directory:

options {
 directory "/var/named";
};

The options statement often contains a good deal more than that, too, including access lists, etc.

After the options statement, add zone statements to configure the name server as authoritative for one or more zones, as described in Recipes Section 1.16, Section 1.17, and Section 1.18. Finally, if you're running a BIND 8 name server, add a special zone statement for the root hints file, which tells the name server the domain names and addresses of the root name servers:

zone "." {
 type hint;
 file "named.root";
};

Check whether your installation came with a root hints file, and make sure the filename in the file substatement matches its name. ("named.root" is just a common name for the root hints file.) If you don't have a root hints file, see Recipe 2.11 for instructions on downloading one.

1.15.3 Discussion

You must specify -- and create! -- a working directory for the name server because there's no default. Some operating systems recommend /var/named or /etc/namedb, but the choice is really yours: just make sure the directory is on a filesystem that is mounted when the name server starts, and that the directory has enough space for your zone data files.

1.15.4 See Also

Recipes Section 1.16 and Section 1.17 for configuring the name server as primary master or slave for a zone, respectively, Section 1.18 for configuring the name server as authoritative for more than one zone, and Section 2.12 for updating (or downloading) a root hints file.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration

Security

Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting

IPv6



DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net