diff --git a/ChangeLog b/ChangeLog index 69384094..d3f57d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,7 +40,7 @@ ver. 0.8.2 (2008/??/??) - stable - Replaced "echo" with "printf" in actions. Fix #1839673 - Replaced "reject" with "drop" in shorwall action. Fix #1854875 -- Fixed Debian bug #456567, #468477 +- Fixed Debian bug #456567, #468477, #462060 ver. 0.8.1 (2007/08/14) - stable ---------- diff --git a/MANIFEST b/MANIFEST index ed66c8d1..aa0a498d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -79,6 +79,7 @@ config/action.d/ipfw.conf config/action.d/iptables.conf config/action.d/iptables-allports.conf config/action.d/iptables-multiport.conf +config/action.d/iptables-multiport-log.conf config/action.d/iptables-new.conf config/action.d/mail.conf config/action.d/mail-buffered.conf diff --git a/config/action.d/iptables-multiport-log.conf b/config/action.d/iptables-multiport-log.conf new file mode 100644 index 00000000..0fe29a88 --- /dev/null +++ b/config/action.d/iptables-multiport-log.conf @@ -0,0 +1,78 @@ +# Fail2Ban configuration file +# +# Author: Guido Bozzetto +# Modified: Cyril Jaquier +# +# make "fail2ban-" chain to match drop IP +# make "fail2ban--log" chain to log and drop +# insert a jump to fail2ban- from -I INPUT if proto/port match +# +# $Revision: 658 $ +# + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = iptables -N fail2ban- + iptables -A fail2ban- -j RETURN + iptables -I INPUT 1 -p -m multiport --dports -j fail2ban- + iptables -N fail2ban--log + iptables -I fail2ban--log -j LOG --log-prefix "$(expr fail2ban- : '\(.\{1,23\}\)'):DROP " --log-level warning -m limit --limit 6/m --limit-burst 2 + iptables -A fail2ban--log -j DROP + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = iptables -D INPUT -p -m multiport --dports -j fail2ban- + iptables -F fail2ban- + iptables -F fail2ban--log + iptables -X fail2ban- + iptables -X fail2ban--log + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = iptables -n -L fail2ban--log >/dev/null + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: IP address +# number of failures +#