Submitted by mike0810 on Thu, 07/21/2016 - 07:41
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
Submitted by mike0810 on Thu, 07/21/2016 - 07:42 Comment #1
https://github.com/fail2ban/fail2ban/issues/1254
Submitted by andreychek on Thu, 07/21/2016 - 08:06 Comment #2
Howdy -- did that link help? I see that one user there mentioned that they resolved it by installing this missing file here:
https://github.com/breauxaj/puppet-fail2ban/blob/master/files/original/r...
Submitted by mike0810 on Thu, 07/21/2016 - 08:21 Comment #3
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.