Construction of a separate DNS parse
method one:
[root@localhost ~]# vim /etc/named.conf
[root@localhost ~]# cd /var/named/
[root@localhost named]# vim crushlinux.zheng.wan
[Root @ localhost named] # chgrp named crushlinux.zheng. * // grant permission
[root@localhost named]# systemctl restart named
test
It appears the success
Method two: modify the main configuration file
Method three: Modify the main configuration file and creates two new files
[root@localhost ~]# vim /var/named/wan.txt
[root@localhost ~]# vim /etc/named.conf
1: This is the location where the linked file if lan.txt in /etc/named/lan.txt
It is include "/etc/named/lan.txt"
2: Same as above
3: This is the name of lan.txt lan referred to in acl said
4: Same as above
Two: to build intelligent DNS domain name server
[root@localhost named]# vim /etc/named.conf
Netcom users ip address is 172.16.1.2
Telecommunications users ip address is 172.16.1.3
[root@localhost ~]# cd /var/named/
[root@localhost named]# vim crushlinux.zheng.wangtong
//www.crushlinux.com ip address 172.16.1.12 Netcom cache server
//172.16.1.13 telecommunications cache server address
[Root @ localhost named] # chgrp named crushlinux.zheng. * // given wangtong, dianxin privileges granted to the named group
root@localhost named]# systemctl restart named
experiment
Analog Netcom users
Analog Telecommunications Users
success
Method Two
Get away
three
Get a different IP address range of operators script execution
[root@localhost ~]# vim ispip.sh
#!/bin/bash
url="http://ispip.clang.cn/"
for i in chinatelecom unicom_cnc cmcc crtc cernet othernet
do
wget url $ $ i.html Precinct /tmp/$i.txt
sed -n '/^[0-9]/ s/<br>/;/gp' /tmp/$i.txt | sed "1iacl $i {" | sed '$a};' > /var/named/$i.txt
done
[root@localhost ~]# chmod +x ispip.sh
[Root @ localhost ~] # bash ispip.sh // execute the script if the virtual function Internet
[root@localhost named]# vim chinatelecom.txt
This is a Telecom or Netcom user's network segment
https://github.com/clangcn/everyday-update-cn-isp-ip
According to the latest list of addresses and IP APNIC whois information, daily 0:00 (Beijing time) generated by the major operators of IP addresses.
China Telecom IP addresses :( http://ispip.clang.cn/chinatelecom.html )
China Unicom (China Netcom) IP addresses :( http://ispip.clang.cn/unicom_cnc.html )
China Mobile IP addresses :( http://ispip.clang.cn/cmcc.html )
China Railcom IP addresses :( http://ispip.clang.cn/crtc.html )
China Education Network IP addresses :( http://ispip.clang.cn/cernet.html )
China Other ISP IP addresses :( http://ispip.clang.cn/othernet.html )