example of using bind
[automated-distro-installer] / bind / named.conf
diff --git a/bind/named.conf b/bind/named.conf
new file mode 100644 (file)
index 0000000..91f58fd
--- /dev/null
@@ -0,0 +1,114 @@
+// This is the primary configuration file for the BIND DNS server named.
+
+// deploy with:
+// named-checkconf named.conf && named-checkzone 0.2.10.in-addr db.0.2.10.in-addr.arpa && scp named.conf db.0.2.10.in-addr.arpa 10.2.0.1:/etc/bind; ssh 10.2.0.1 /etc/init.d/named restart
+
+
+options {
+
+  listen-on { localnets; localhost; };
+  listen-on-v6 { localnets; localhost; };
+       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.
+
+
+       auth-nxdomain no;    # conform to RFC1035
+};
+
+#acl trusted { 10.2.0.7; 10.2.0.3; 10.2.0.2; };
+acl "trusted" { 10.2.0.7; };
+view "trusted" {
+  match-clients { "trusted"; };
+  forwarders {
+    1.1.1.1 ;
+    1.0.0.1 ;
+    2606:4700:4700::1111 ;
+    2606:4700:4700::1001 ;
+  };
+  forward only ;
+
+  // prime the server with knowledge of the root servers
+  zone "." {
+          type hint;
+          file "/etc/bind/db.root";
+  };
+
+  // be authoritative for the localhost forward and reverse zones, and for
+  // broadcast zones as per RFC 1912
+
+  zone "localhost" {
+          type master;
+          file "/etc/bind/db.local";
+  };
+
+  zone "127.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.127";
+  };
+
+  zone "0.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.0";
+  };
+
+  zone "255.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.255";
+  };
+
+  zone "0.2.10.in-addr.arpa" {
+    type master;
+    file "/etc/bind/db.0.2.10.in-addr.arpa";
+  };
+};
+
+
+acl "guest" { localnets;  localhost; };
+view "guest" {
+  match-clients { "guest"; };
+
+  forwarders {
+    1.1.1.3 ;
+    1.0.0.3 ;
+    2606:4700:4700::1113 ;
+    2606:4700:4700::1003 ;
+  };
+  forward only ;
+  // prime the server with knowledge of the root servers
+  zone "." {
+          type hint;
+          file "/etc/bind/db.root";
+  };
+
+  // be authoritative for the localhost forward and reverse zones, and for
+  // broadcast zones as per RFC 1912
+
+  zone "localhost" {
+          type master;
+          file "/etc/bind/db.local";
+  };
+
+  zone "127.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.127";
+  };
+
+  zone "0.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.0";
+  };
+
+  zone "255.in-addr.arpa" {
+          type master;
+          file "/etc/bind/db.255";
+  };
+
+  zone "0.2.10.in-addr.arpa" {
+    type master;
+    file "/etc/bind/db.0.2.10.in-addr.arpa";
+  };
+};