Simple and flexible firewall for Linux server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
445 B

cd /var/tmp
rm -f $ripedeny_file
GET > ripe.cidr.md5
GET > ripe.cidr
for i in CN KR RU; do
grep "^$i|" ripe.cidr >> $ripedeny_file
/sbin/iptables -F NEEDRESTRICT
for i in $(cat $ripedeny_file); do
BLOCK=$(echo $i | cut -d"|" -f2)
/sbin/iptables -I NEEDRESTRICT -s $BLOCK -j DROP