Tech/OSS/BIND9
Jump to navigation
Jump to search
Berkeley Internet Name Domain (BIND)
Bind 9
For decades it was BIND4 and it is a good reminder to be careful of versions in software. BIND can be thought of as one of the first DNS solutions other than hosts files.
Example config file
zone "example.com" { type master; notify no; file "/etc/bind/custom/example.com.zone"; }; zone "113.0.203.IN-ADDR.ARPA" { type master; notify no; file "/etc/bind/custom/113.0.203.in-addr.arpa"; }; zone "0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; notify no; file "/etc/bind/custom/0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa"; };
Example zone file "example.com.zone"
$TTL 3600 @ IN SOA example.com. email.example.com ( 1 1w 1d 2419200 1w ) @ IN NS ns. @ IN A 203.0.113.1 ; 203.0.113.0/24 rfc5737 ; 2001:DB8::/32 rfc3849
Example arpa zone for IPv4 "113.0.203.in-addr.arpa"
$TTL 1h 113.0.203.IN-ADDR.ARPA. IN SOA ns.example.com. email.example.com. ( 1 1w 1d 1w 1h ) IN NS ns.example.com. 1 IN PTR www.example.com. 2 IN PTR ns.example.com. 3 IN PTR mail.example.com.
Example arpa zone for IPv6 "0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa"
$TTL 1h 0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.IP6.ARPA. IN SOA ns.example.com. email.example.com. ( 1 1h 15m 1w 1h ) IN NS ns.example.com. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. IN PTR www.example.com. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. IN PTR ns.example.com.