Contexte
Memento présentant la configuration minimale requise pour un serveur DNS Master unique, sans redondance et fonctionnel, implémenté par Bind9, avec mises à jour dynamiques DNS.
Fichier /etc/network/interfaces
auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 192.168.1.11 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-search opensharing.priv dns-nameservers 127.0.0.1
Fichier /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.1.11 dns1-test.opensharing.priv dns1-test
Fichier /etc/host.conf
order hosts, bind multi on
Fichier /etc/resolv.conf
nameserver 127.0.0.1 search opensharing.priv
Fichier /etc/bind/tsig.key
key "tsig-key" { algorithm hmac-md5; secret "pzDEGpd36rKTJJChe/z9K/BFwZ3SQqPjtbD4mIAhRoIY5uYl9KXiV4wyllv85MbXAWsW6Qkjavld070MPdNq3A=="; };
Fichier /etc/bind/named.conf
include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; include "/etc/bind/tsig.key";
Fichier /etc/bind/named.conf.options
options { directory "/var/cache/bind"; };
Fichier /etc/bind/named.conf.local
zone "opensharing.priv" IN { type master; file "/var/cache/bind/db.opensharing.priv"; allow-update { key "tsig-key"; }; allow-transfer { localhost; }; }; zone "1.168.192.in-addr.arpa" IN { type master; file "/var/cache/bind/db.opensharing.priv.inv"; allow-update { key "tsig-key"; }; allow-transfer { localhost; }; };
Fichier /var/cache/bind/db.opensharing.priv
$ORIGIN opensharing.priv. $TTL 86400 @ IN SOA dns1-test.opensharing.priv. adminsys.opensharing.priv. ( 2016060501 ; serial 21600 ; refresh 6h 3600 ; retry 1h 604800 ; expire 1 week 86400 ) ; minimum TTL 1 day IN NS dns1-test.opensharing.priv. dns1-test IN A 192.168.1.11 dns1 IN CNAME dns1-test
Fichier /var/cache/bind/db.opensharing.priv.inv
$ORIGIN 1.168.192.in-addr.arpa. $TTL 86400 @ IN SOA dns1-test.opensharing.priv. adminsys.opensharing.priv. ( 2016060501 ; serial 21600 ; refresh 6h 3600 ; retry 1h 604800 ; expire 1 week 86400 ) ; minimum TTL 1 day IN NS dns1-test.opensharing.priv. 11 IN PTR dns1-test.opensharing.priv. 11 IN PTR dns1.opensharing.priv.