From: Matthijs Kooijman Date: Thu, 10 Sep 2009 10:40:46 +0000 (+0200) Subject: Add default iptables-multiport fail2ban action. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=549adc42a17671f25ef98ea72c4ad25593b28a09;p=matthijs%2Fservers%2Fdrsnuggles.git Add default iptables-multiport fail2ban action. This will config file will be modified in the next commit. --- diff --git a/etc/fail2ban/action.d/iptables-multiport.conf b/etc/fail2ban/action.d/iptables-multiport.conf new file mode 100644 index 0000000..84c7d53 --- /dev/null +++ b/etc/fail2ban/action.d/iptables-multiport.conf @@ -0,0 +1,69 @@ +# Fail2Ban configuration file +# +# Author: Cyril Jaquier +# Modified by Yaroslav Halchenko for multiport banning +# $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 -p -m multiport --dports -j fail2ban- + +# 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 -X fail2ban- + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = iptables -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 +#