blacklistcountrieswithshorewallandipset
Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
blacklistcountrieswithshorewallandipset [2017/10/29 16:10] 127.0.0.1 external edit |
blacklistcountrieswithshorewallandipset [2020/02/13 22:55] (current) |
#Debug | #Debug |
# set -x | # set -x |
| |
| exec 1> >(logger -s -t $(basename $0)) 2>&1 |
| |
logger "Start: $0" | logger "Start: $0" |
| |
/usr/sbin/ipset -N geoblock nethash -exist | /sbin/ipset create geoblock hash:net -exist |
# Most files on ipdeny.com are now zero length, I grab and parse from the RIR instead | /sbin/ipset flush geoblock |
# for IP in $(/usr/bin/wget -O - http://www.ipdeny.com/ipblocks/data/countries/{cn,vn}.zone) | |
| #for IP in $(/usr/bin/wget -O - http://www.ipdeny.com/ipblocks/data/countries/{ca,us}.zone) |
for IP in $(/usr/bin/wget -q -O - ftp://ftp.arin.net/pub/stats/apnic/delegated-apnic-latest | awk -F'|' 'BEGIN{OFS=""} ( $2 == "CN" || $2 == "VN" ) && $3 == "ipv4" {print $4,"/",32-(log($5)/log(2))}' | aggregate) | for IP in $(/usr/bin/wget -q -O - ftp://ftp.arin.net/pub/stats/apnic/delegated-apnic-latest | awk -F'|' 'BEGIN{OFS=""} ( $2 == "CN" || $2 == "VN" ) && $3 == "ipv4" {print $4,"/",32-(log($5)/log(2))}' | aggregate) |
| |
blacklistcountrieswithshorewallandipset.1509307821.txt.gz · Last modified: 2020/02/13 22:55 (external edit)