DNS BIND 'named.conf' include statement

The 'include' statement reads the specified file at the point it is encountered.

include "file-name";

'file-name' can be an absolute path e.g. /var/named/file.name or relative e.g. file.name in which case it will be assumed to be in the directory previously nominated by a directory statement. In the absence of a 'directory' option the directory from which bind was loaded is used.

Note: The include statement is BIND specific and should not be confused with the RFC 1035 standard $INCLUDE directive.

The 'include' statement may be used for three purposes:

  1. To simplify or distribute administration of bind file creation, for instance, a zone files may be administered independently by divisions of a company.
  2. To isolate and partition changes and updates, for example, if acl lists change frequently it may be desirable to separate them into files which can be included, minimising the need to edit the primary named.conf file.
  3. Security - it may be desirable to limit access using permissions to files containing, for example, key or trusted-keys records by applying permissions which only allow root or 'named' users to view/edit them.


 options {
 directory "/var/named";
//  using include for zones
// zones for chemical division - absolute path
 include "/var/named/chemical/zone.files";
// zones for engineering division
 include "/var/named/engineering/zone.files";
// these load from the path specified by 'directory' option
 include "more-zone.files";
// housekeeping zones explicitly included
zone "64/" in{
	type master;
	file "192.169.23.rev";