Bind 9 Administrator Reference Manual
Chapter 3. Nameserver Configuration
In this section we provide some suggested configurations along with guidelines for their use. We also
address the topic of reasonable option setting.
3.1. Sample Configurations
3.1.1. A Caching-only Nameserver
The following sample configuration is appropriate for a caching-only name server for use by clients
internal to a corporation. All queries from outside clients are refused.
// Two corporate subnets we wish to allow queries from.
acl "corpnets" { 192.168.4.0/24; 192.168.7.0/24; };
options {
directory "/etc/namedb"; // Working directory
pid-file "named.pid"; // Put pid file in working dir
allow-query { "corpnets"; };
};
// Root server hints
zone "." { type hint; file "root.hint"; };
// Provide a reverse mapping for the loopback address 127.0.0.1
zone "0.0.127.in-addr.arpa" {
type master;
file "localhost.rev";
notify no;
};
3.1.2. An Authoritative-only Nameserver
This sample configuration is for an authoritative-only server that is the master server for
"example.com" and a slave for the subdomain "eng.example.com".
options {
directory "/etc/namedb"; // Working directory
pid-file "named.pid"; // Put pid file in working dir
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service
};
17