获取最新的中国IP的脚本,给ROS可以使用的脚本


wget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest
echo "/ip firewall address-list" > address-list_`date +"%Y%m%d"`.rsc
grep "|CN|ipv4" delegated-apnic-latest | awk -F'|' '{print "add address="$4"/"32-int(log(int($5))/log(2))" disabled=no list=china-ip"}' >> address-list_`date +"%Y%m%d"`.rsc
rm delegated-apnic-latest

 

参考文章:

http://autorosvpn.blogspot.com/2013/05/ipros_20.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM