--- fail2ban/iptables-allports.conf 2011-04-02 03:59:01.178912076 +0200 +++ /etc/fail2ban/action.d/iptables-allports.conf 2011-04-02 15:11:47.441713873 +0200 @@ -13,9 +13,12 @@ # Notes.: command executed once at the start of Fail2Ban. # Values: CMD # -actionstart = iptables -N fail2ban- +actionstart = ( flock -x 200 + iptables -n -L fail2ban-sshd &> /dev/null && exit 0 + iptables -N fail2ban- iptables -A fail2ban- -j RETURN iptables -I INPUT -p -j fail2ban- + ) 200>/var/lock/fail2ban-iptables-allports # Option: actionstop # Notes.: command executed once at the end of Fail2Ban