The BIND configuration file, /etc/named.conf establishes the server as a master, slave, or cache-only name server. It also specifies the zones over which the server has authority and which data files it should read to get its initial data.
The /etc/named.conf file contains statements that implement the following.
Security through an Access Control List (ACL) that defines a collection of IP addresses that an NIS+ host has read/write access
Logging specifications
Selectively applied options for a set of zones, rather than to all zones
The configuration file is read by in.named when the daemon is started by the server's start up script, /etc/init.d/inetsvc. The configuration file directs in.named either to other servers or to local data files for a specified domain.
The named.conf file contains statements and comments. Statements end with a semicolon. Some statements can contain a contain a block of statements. Again, each statement in the block is terminated with a semicolon.
The named.conf file supports the following statements.
Table 5–4 named.conf Statements|
Statement |
Description |
|---|---|
| acl | Defines a named IP address match list used for access control. The address match list designates one or more IP addresses (dotted-decimal notation) or IP prefixes (dotted-decimal notation followed with a slash and the number of bits in the netmask). The named IP address match list must be defined by an acl statement before it can be used elsewhere; no forward references allowed. |
| include | Inserts an include file at the point where the include statement is encountered. Use include to break up the configuration into more easily managed chunks. |
| key | Specifies a key ID used for authentication and authorization on a particular name server. See the server statement. |
| logging | Specifies the information the server logs and the destination of log messages. |
| options | Controls global server configuration options and sets default values for other statements. |
| server | Sets designated configuration options associated with a remote name server. Selectively applies options on a per-server basis, rather than to all servers. |
| zone | Defines a zone. Selectively applies options on a per-zone basis, rather than to all zones. |
options {
directory "/var/named";
datasize 2098;
forward only;
forwarders {
99.11.33.44;
};
recursion no;
transfers-in 10;
transfers-per-ns 2;
allow-transfer {
127.0.1.1/24;
};
};
logging {
category queries { default_syslog; };
};
include "/var/named/abcZones.conf"
// here are the names of the master files
zone "cities.zn" {
type master;
file "db.cities.zn";
};
zone "0.0.127.in-addr.arpa." {
type master;
file "db.127.cities.zn";
};
zone "168.192.in-addr.arpa" {
type master;
file "db.cities.zn.rev";
};
zone "sales.doc.com" {
type slave;
file "slave/db.sales.doc";
masters {
192.168.1.151;
};
};
zone "168.192.in-addr.arpa" {
type slave;
file "slave/db.sales.doc.rev";
masters {
192.168.1.151;
};
};
|