-
Notifications
You must be signed in to change notification settings - Fork 0
DNS
dhellstern edited this page Apr 3, 2022
·
8 revisions
First, install the bind9 package. Then, navigate to /etc/bind/, and edit named.conf. Comment out any existing lines, and add the following contents. The listen-on addresses must be the DN42 IPs of the server to prevent conflicts with the systemd-resolved stub listener.
options {
directory "/var/cache/bind";
allow-recursion { any; };
allow-query-cache { any; };
allow-query { any; };
allow-transfer { none; };
dnssec-validation no;
listen-on port 53 { <outside ip>; };
listen-on-v6 port 53 { <outside ipv6>; };
empty-zones-enable no;
};
include "/etc/bind/named.forwarders.conf";
include "/etc/bind/named.dn42.conf";Then, create the file named.forwarders.conf, and add the contents from the DN42 Wiki for BIND forwarding. Next, edit named.dn42.conf, and add entries for each forward and reverse zone.
zone "<zone>" {
type master;
file "/etc/bind/zones/<zone>.zone";
};
I then created each zone file using DNSControl, a DNS automation tool (see the dnsconfig.js used to generate the BIND files for this project).
Then, enable and start the bind9/named service.