Install
$ sudo apt update
$ sudo apt install bind9 bind9utils
Set BIND to IPv4 mode.
$ sudo nano /etc/default/named
# run resolvconf?
RESOLVCONF=no
# startup options for the server
OPTIONS="-u bind"
Configure Options
sudo nano /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
forwarders {
1.1.1.1;
8.8.8.8;
};
allow-query {
any;
};
recursion yes;
dnssec-validation auto;
};
Configure Local
$ sudo nano /etc/bind/named.conf.local
zone "berladyn.home" {
type primary;
file "/etc/bind/db.berladyn.home";
};
Configure Domain
$ sudo nano /etc/bind/db.berladyn.home
$TTL 604800
@ IN SOA ns1.berladyn.home. root.berladyn.home. (
2410022330 ; serial number
604800 ; refresh
86400 ; update retry
2419200 ; expiry
604800 ; minimum
)
@ IN NS ns1.berladyn.home.
shaw IN A 10.0.0.1
* IN A 192.168.0.1
wifi IN A 192.168.0.2
ns1 IN A 192.168.0.3
ns2 IN A 192.168.0.4
data IN A 192.168.0.5
onyx IN A 192.168.0.22
adam IN A 192.168.0.23
www IN A 192.168.0.220
api IN A 192.168.0.221
Command
# systemctl enable bind9
# systemctl start bind9
# systemctl restart bind9
# systemctl status bind9
Manual