From abc45d28f7b33c68c4cf4b33808e28cf6b30542b Mon Sep 17 00:00:00 2001 From: Th4nat0s Date: Thu, 14 Jun 2012 23:44:52 +0200 Subject: [PATCH 1/7] initial ipv6 via iptable wapper --- config/action.d/iptables-multiport-46.conf | 69 ++++++++++++++++++++++ fail2ban-iptwrp | 49 +++++++++++++++ server/failregex.py | 2 +- server/filter.py | 17 +++--- setup.py | 3 +- 5 files changed, 131 insertions(+), 9 deletions(-) create mode 100644 config/action.d/iptables-multiport-46.conf create mode 100755 fail2ban-iptwrp diff --git a/config/action.d/iptables-multiport-46.conf b/config/action.d/iptables-multiport-46.conf new file mode 100644 index 00000000..7bb944e4 --- /dev/null +++ b/config/action.d/iptables-multiport-46.conf @@ -0,0 +1,69 @@ +# Fail2Ban configuration file +# +# Author: Cyril Jaquier +# Modified by Yaroslav Halchenko for multiport banning +# Modified by Paul Jung for calling wrapper in dual stack ipv6 and v4 banning +# + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = fail2ban-iptwrp -N fail2ban- + fail2ban-iptwrp -A fail2ban- -j RETURN + fail2ban-iptwrp -I INPUT -p -m multiport --dports -j fail2ban- + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = fail2ban-iptwrp -D INPUT -p -m multiport --dports -j fail2ban- + fail2ban-iptwrp -F fail2ban- + fail2ban-iptwrp -X fail2ban- + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = fail2ban-iptwrp -n -L INPUT | grep -q fail2ban- + +# 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 +#