Tongxin UOS configuration DNS

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

image-20220412193142050

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

image-20220412193231132

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";
};

image-20220412193353930

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

image-20220412193459978

vim hb.com #Write forward parsing file

image-20220412193533578

vim 10.arpa #Write reverse analysis file

image-20220412193601194

vim /etc/resolv.conf #Write network card configuration file

image-20220412193646449

systemctl restart named #Restart dns service

image-20220412193717906

test

nslookup www.hb.com #Test forward address

image-20220412193745906

nslookup 192.168.10.1 #Test reverse address

Guess you like

Origin blog.csdn.net/qq_54100121/article/details/134426163
Recommended