DNS
yum install bind* -y #Install dns service
systemctl enable named #Add dns service to auto-start at boot
systemctl restart named #Restart dns service
vim /etc/named.conf #Modify the main configuration file
listen-on port 53 {any;}; #Allow listening on all ports
allow-query {any;}; #Allow all users to access the dns server
because /etc/named.rfc1912.zones
zone "hb.com" IN {
type master;
file "hb.com";
};
zone "10.168.192.in-addr.arpa" IN {
type master;
file "10.arpa";
};
cd /var/named/ #Switch to the dns template
cp -a named.localhost hb.com #Copy forward template
cp -a named.loopback 10.arpa #Copy reverse template
vim hb.com #Write forward parsing file
vim 10.arpa #Write reverse analysis file
vim /etc/resolv.conf #Write network card configuration file
systemctl restart named #Restart dns service
test
nslookup www.hb.com #Test forward address
nslookup 192.168.10.1 #Test reverse address