Description of problem: fail2ban fails to call iptables properly due to mangled commands. Version-Release number of selected component (if applicable): fail2ban-0.8.8-3.el6.noarch How reproducible: Always Steps to Reproduce: 1. configure ssh-iptables jail 2. service fail2ban start Actual results: Mar 16 00:10:08 mokona fail2ban.actions.action: ERROR iptables -N fail2ban-SSH#012iptables -A fail2ban-SSH -j RETURN#012iptables -I INPUT -p tcp --dport ssh -j fail2ban-SSH returned 300 Mar 16 00:10:08 mokona fail2ban.actions.action: ERROR iptables -N fail2ban-sasl#012iptables -A fail2ban-sasl -j RETURN#012iptables -I INPUT -p tcp --dport imaps -j fail2ban-sasl returned 300 Expected results: No errors, successful iptables setup. Additional info: This might be related to bug 905097, as I'm still seeing weird characters in syslog: Mar 16 00:10:07 mokona <BF><30>fail2ban.filter : INFO Added logfile = /var/log/secure Mar 16 00:10:07 mokona <BF><30>fail2ban.filter : INFO Set maxRetry = 5 Mar 16 00:10:07 mokona <BF><30>fail2ban.filter : INFO Set findtime = 900 ... Mar 16 00:10:08 mokona <BF><30>fail2ban.filter : INFO Added logfile = /var/log/maillog Mar 16 00:10:08 mokona <BF><30>fail2ban.filter : INFO Set maxRetry = 3 Mar 16 00:10:08 mokona <BF><30>fail2ban.filter : INFO Set findtime = 900
My ssh-iptables jail config: [ssh-iptables] enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=root, sender=fail2ban@myserver] logpath = /var/log/secure maxretry = 5
Looks like a SELinux issue *** This bug has been marked as a duplicate of bug 916727 ***
restorecon -R -v /sbin/ That will repair the context of /sbin/iptables-multi-1.4.7 Now it works ;)