Install and Configure Bind On Ubuntu18.04
Install and Configure Bind On Ubuntu18.04
4 LTS
Gain Supper User Access
sudo -i
apt update
named -v
vim /etc/bind/named.conf.local
zone "example.com" {
type master;
file "/etc/bind/example.com.zone";
};
zone "10.168.192.in-addr.arpa" {
type master;
file "/etc/bind/192.168.10.zone";
};
vim /etc/bind/example.com.zone
$TTL 604800
$ORIGIN example.com.
@ IN SOA ns01.example.com. root.example.com. (
2020111100 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns01.example.com.
@ IN MX 10 ns01.example.com.
ns01 IN A 192.168.10.230
cka-master IN A 192.168.10.200
cka-node1 IN A 192.168.10.201
cka-node2 IN A 192.168.10.202
www IN CNAME ns01.example.com.
mail IN CNAME ns01.example.com.
ftp IN CNAME ns01.example.com.
vim /etc/bind/192.168.10.zone
$TTL 604800
$ORIGIN 10.168.192.IN-ADDR.ARPA.
@ IN SOA ns01.example.com. root.example.com. (
2020111100 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns01.example.com.
230 IN PTR ns01.example.com.
200 IN PTR cka-master.example.com.
201 IN PTR cka-node1.example.com.
202 IN PTR cka-node2.example.com.
Check named.conf.local for configuration errors
named-checkconf
vim /etc/resolv.conf
search example.com
nameserver 127.0.0.1
nameserver 8.8.8.8
ss -tln
Testing bind9
Check bind9 logs
journalctl -f -u bind9
Test NS Records
dig NS example.com @127.0.0.1