Create actual files vs. just a readme
parent
14fd1b98f8
commit
e52186beaf
@ -0,0 +1,9 @@
|
||||
[asterisk-iptables]
|
||||
|
||||
enabled = true
|
||||
filter = asterisk
|
||||
action = iptables-allports[name=ASTERISK, protocol=all]
|
||||
voipbl[serial=XXXXXXXXXX]
|
||||
logpath = /var/log/asterisk/messages
|
||||
maxretry = 5
|
||||
bantime = 259200
|
@ -0,0 +1,14 @@
|
||||
# Description: Configuration for Fail2Ban
|
||||
|
||||
[Definition]
|
||||
|
||||
actionban = <getcmd> "<url>/ban/?serial=<serial>&ip=<ip>&count=<failures>"
|
||||
actionunban = <getcmd> "<url>/unban/?serial=<serial>&ip=<ip>&count=<failures>"
|
||||
|
||||
[Init]
|
||||
|
||||
getcmd = wget --no-verbose --tries=3 --waitretry=10 --connect-timeout=10 \
|
||||
--read-timeout=60 --retry-connrefused --output-document=- \
|
||||
--user-agent=Fail2Ban
|
||||
|
||||
url = http://www.voipbl.org
|
@ -0,0 +1,12 @@
|
||||
#!/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
|
Loading…
Reference in New Issue