BIND DNS

From Michael's Information Zone
Jump to navigation Jump to search

[1]

Forwarders

options {
        forwarders { 9.9.9.9; };

acl

  • Only allow specific subnets
acl internal { 10.0.0.0/8; };

options {
        forwarders { 9.9.9.9; };
        listen-on port 53 { 10.201.2.21; };
        ...
        allow-query     { internal; };
        ...

zone file

I needed to create an A record for a specific server. This was done by

  • Editing named.conf
zone "1.custom.net" {
  type master;
  file "/etc/named/db.1.custom.net";
};
  • Creating db.1.custom.net
$TTL    604800
@       IN      SOA     1.custom.net. root.1.custom.net. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL

        IN      NS      ns
@     IN     A       192.168.1.2
ns      IN      A       192.168.1.1