DNS server: BIND

Table of Contents

Configuration
named.conf
Zones
Logging

named.conf

by ross at 16:58:06 on March 20, 2014

Here's the diff to show you the changes. Edit your /usr/local/etc/namedb/named.conf to meet your needs.

--- named.conf.sample   2014-01-26 23:25:15.032965000 +0200
+++ named.conf  2014-01-26 13:00:55.778045426 +0200
@@ -19,7 +19,7 @@
 // If named is being used only as a local resolver, this is a safe default.
 // For named to be accessible to the network, comment this option, specify
 // the proper IP address, or delete this option.
-       listen-on       { 127.0.0.1; };
+       listen-on       { 127.0.0.1; 192.168.10.1; };
 
 // If you have IPv6 enabled on this system, uncomment this option for
 // use as a local resolver.  To give access to the network, specify
@@ -35,18 +35,19 @@
 // If you've got a DNS server around at your upstream provider, enter
 // its IP address here, and enable the line below.  This will make you
 // benefit from its cache, thus reduce overall DNS traffic in the Internet.
-/*
+
        forwarders {
-               127.0.0.1;
+               8.8.8.8;
+               8.8.4.4;
        };
-*/
+
 
 // If the 'forwarders' clause is not empty the default is to 'forward first'
 // which will fall back to sending a query from your local server if the name
 // servers in 'forwarders' do not have the answer.  Alternatively you can
 // force your name server to never initiate queries of its own by enabling the
 // following line:
-//     forward only;
+       forward first;
 
 // If you wish to have forwarding configured automatically based on
 // the entries in /etc/resolv.conf, uncomment the following line and
@@ -358,3 +359,21 @@
        };
 };
 */
+
+zone "lan" {
+        type master;
+        file "/usr/local/etc/namedb/dynamic/lan-forward.db";
+        allow-update { key rndc-key; };
+};
+
+zone "10.168.192.in-addr.arpa" {
+        type master;
+        file "/usr/local/etc/namedb/dynamic/lan-reverse.db";
+        allow-update { key rndc-key; };
+};
+
+include "/usr/local/etc/namedb/named.key";
+controls {
+        inet 127.0.0.1 port 953
+        allow { 127.0.0.1; } keys { "rndc-key"; };
+};

 

Comments