#72 DNS With BIND9

We managed to get DNS setup using BIND9 on our Raspberry Pi data center. We go over what we did, how we did it, and what we learned. This was a little tricky because BIND has several config files. We also had to reconfigure the DHCP server so Dorothy's workstation would get the correct DNS servers. 

Here are the configuration files from the master DNS server. 

named.conf.local

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "toshiro.lan" {
        type master;
        file "/etc/bind/db.toshiro.lan";
        allow-transfer { 10.100.5.8; };
};

zone "5.100.10.in-addr.arpa" {
        type master;
        file "/etc/bind/db.10";
        allow-transfer { 10.100.5.8; };
};

db.toshitro.lan - forward lookup zone

;
; BIND data file for toshiro.lan
;
$TTL    300
@       IN      SOA     toshiro.lan. root.toshiro.lan. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
        IN      A       10.100.5.7
;
@       IN      NS      ns.toshiro.lan.
@       IN      A       10.100.5.7
@       IN      AAAA    ::1
ns      IN      A       10.100.5.7
pi1     IN      A       10.100.5.7
 

db.10 - reverse lookup zone

;
; BIND reverse data file for local 10.100.5.XXX net
;
$TTL    300
@       IN      SOA     ns.toshiro.lan. root.toshiro.lan. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
7       IN      PTR     ns.toshiro.lan.
7       IN      PTR     pi1.toshiro.lan.
 

 

Damien Hull