bind: update named.conf
authorDavid Härdeman <[email protected]>
Sat, 26 Jul 2025 22:39:22 +0000 (00:39 +0200)
committerNoah Meyerhans <[email protected]>
Sat, 13 Sep 2025 20:36:41 +0000 (13:36 -0700)
First, change the "directory" to point to /var/cache/bind, which ensures that
e.g. simple file "something" statements for secondary servers will create files
there (the directory is created by the init script, so we're sure that it
exists). This behaviour matches e.g. what Debian does.

Second, remove the "auth-nxdomain" stanza which is the default in bind since
9.0 was released.

Third, change "master" to "primary" (the wording used in the bind reference
docs)

Signed-off-by: David Härdeman <[email protected]>
net/bind/files/bind/named.conf.example

index fbe99dcf837dc7b87edb2c7099da6af109ca5a27..841070587921652f1c581a681a353c8ddefb674a 100644 (file)
@@ -1,18 +1,7 @@
 // This is the primary configuration file for the BIND DNS server named.
 
 options {
-       directory "/tmp";
-
-       // If your ISP provided one or more IP addresses for stable 
-       // nameservers, you probably want to use them as forwarders.  
-       // Uncomment the following block, and insert the addresses replacing 
-       // the all-0's placeholder.
-
-       // forwarders {
-       //      0.0.0.0;
-       // };
-
-       auth-nxdomain no;    # conform to RFC1035
+       directory "/var/cache/bind";
 };
 
 include "/etc/bind/named-rndc.conf";
@@ -29,21 +18,21 @@ zone "." {
 // broadcast zones as per RFC 1912
 
 zone "localhost" {
-       type master;
+       type primary;
        file "/etc/bind/db.local";
 };
 
 zone "127.in-addr.arpa" {
-       type master;
+       type primary;
        file "/etc/bind/db.127";
 };
 
 zone "0.in-addr.arpa" {
-       type master;
+       type primary;
        file "/etc/bind/db.0";
 };
 
 zone "255.in-addr.arpa" {
-       type master;
+       type primary;
        file "/etc/bind/db.255";
 };