You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
439 B
Bash
13 lines
439 B
Bash
#!/bin/bash
|
|
|
|
# Check if chain exists and create one if required
|
|
if [ `iptables -S | grep -c "BLACKLIST-INPUT"` -lt 1 ]; then
|
|
/sbin/iptables -N BLACKLIST-INPUT
|
|
/sbin/iptables -I INPUT 1 -j BLACKLIST-INPUT
|
|
fi
|
|
|
|
# Empty the chain
|
|
/sbin/iptables -F BLACKLIST-INPUT
|
|
wget -qO - http://www.voipbl.org/update/ |\
|
|
awk '{print "if [ ! -z \""$1"\" -a \""$1"\" != \"#\" ]; then /sbin/iptables -A BLACKLIST-INPUT -s \""$1"\" -j DROP;fi;"}' | sh
|