apt update
apt install bind9 dnsutils
mkdir /etc/bind/zones
cp /etc/bind/db.local /etc/bind/zones/db.yourdomain.com
named-checkconf
systemctl start bind9
systemctl enable bind9
rndc dumpdb -cache
acl "trusted" {
192.168.0.0/16;
localhost;
localnets;
};
options {
directory "/var/cache/bind";
recursion yes;
allow-query { trusted; };
forwarders {
8.8.8.8;
8.8.4.4;
};
dnssec-validation auto;
listen-on { any; };
listen-on-v6 { any; };
};
zone "yourdomain.com" {
type master;
file "/etc/bind/zones/db.yourdomain.com";
};