配置缓存服务器:
#vim /etc/named.conf
Options {
Listen-on port 53 { 127.0.0.1;172.16.0.68;};
//listen-on-v6 port 53 {::1;};
…….
Allow-query {any;};
……
Dnssec-enable no;
Dnssec-validation no;
#name-checkconf
#systemctl start named.service
Host -t Awww.baidu.com 172.16.250.207
主从服务器:
#vim /etc/named.rfc1912.zones
….
Zone “iline.io” IN {
Type slave;
File “slares /ilinux.io.zone”;
Master {172.16.0.67;};
};
#named-checkconf
#rndc reload
#cd /var/named/
#cd /slaves/
#dig -t A www.ilinux.io @172.16.0.68
#vim /etc/named.rfc1912.zones
…
Zone ”16.172.in-addr.arpa” IN {
Type slave;
File “slaves/172.16.zone”;
Masters {172.16.0.67;};
};
#named-chexkconf
Rndc reload
#dig -x 172.16.0.200 @172.16.0.68
访问控制:
#vim /etc/named.conf
…
Acl test {
172.16.0.200;
172.16.0.67;
};
Options {
….
#vim /etc/named.rfc1912.zone
…
Zone “ilinux.io” IN {
Type master;
File “ilinux.io.zone”;
Allow-query { test; };
};
#named-checkconf
#Rndc reload
#dig -t A www.ilinux.io @172.16.0.67
原创文章,作者:忠神通,如若转载,请注明出处:http://www.178linux.com/77515