安装IP地址段查询工具Ripe-dbase-client-v3:
下载软件包:
shell# wget
安装软件包
shell# tar -zxvf ripe-dbase-client-v3.tar.gz
shell# ./configure
shell# make
shell# make install
设置网通IP列表ACL文件cnc_acl.conf:
shell# whois3 -h whois.apnic.net -l -i
mb MAINT-CNCGROUP | grep "descr" | grep "Reverse" | awk -F "for" '{if
($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl \"CNC\"
'{'"}{print $1";"}END{print "'}';"}' > cnc_acl.conf
设置电信IP列表ACL文件telecom_acl.conf:
shell# whois3
-h whois.apnic.net -l -i mb MAINT-CHINANET | grep "descr" | grep
"Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk
'BEGIN{print "acl \"TELECOM\" '{'"}{print $1";"}END{print "'}';"}' > telecom_acl.conf
设置移动IP列表ACL文件cmss_acl.conf:
shell# whois3 -h whois.apnic.net -l -i mb MAINT-CN-CMCC | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl \"CMSS\" '{'"}{print $1";"}END{print "'}';"}' > cmss_acl.conf
设置铁通IP列表ACL文件crtc_acl.conf:
shell# whois3 -h whois.apnic.net -l -i mb MAINT-CN-CRTC | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl \"CRTC\" '{'"}{print $1";"}END{print "'}';"}' > crtc_acl.conf
阅读(1984) | 评论(0) | 转发(0) |