Default fail2ban implementation missing <blocktype> parameter

When setup fail2ban with firewalld, rule fails with:

fail2ban.action [1884]: ERROR firewall-cmd --direct --add-rule ipv4 filter f2b-Postfixauth 0 -s 91.214.229.34 -j -- stdout: '' 2016-07-21 13:58:36,252 fail2ban.action [1884]: ERROR firewall-cmd --direct --add-rule ipv4 filter f2b-Postfixauth 0 -s 91.214.229.34 -j -- stderr: "/bin/sh: -c: line 0: syntax error near unexpected token newline'\n/bin/sh: -c: line 0:firewall-cmd --direct --add-rule ipv4 filter f2b-Postfixauth 0 -s 91.214.229.34 -j '\n"

There is no parameter available.

[root@webhost01 action.d]# cat firewallcmd-allports.conf

Fail2Ban configuration file

#

Author: Donald Yandt Because of the --remove-rules in stop this action requires firewalld-0.3.8+

[INCLUDES]

before = iptables-blocktype.conf

But iptables-blocktype.conf is not existing in /etc/fail2ban

Status: 
Active

Comments

Hi there,

I did change the /etc/fail2ban/action.d/firewallcmd-allports.conf to

[INCLUDES]

before = iptables-common.conf

instead of adding iptables-blocktype.conf

See what the next upgrade brings, I hope it doesn´t break it.

firewallcmd-multiport.conf is also wrong.