Firewalld & Fail2ban

Does anyone know how to configure fail2ban with firewalld. Fail2ban is configured to work with iptables but ASTPP installs firewalld instead.

When you install ASTPP using installation script, it automatically install and configure fail2ban with firewall. So I am not sure why do you need to do that manually.

  1. Because there is a syntax error in /etc/fail2ban/action.d/iptables-allports.conf
    actionban = iptables I fail2ban<name> l -s -j <blocktype>
    /opt/ASTPP/misc/banipcollector.php
    should be:
    actionban = iptables -I fail2ban-<name> l -s -j <blocktype>
    /opt/ASTPP/misc/banipcollector.php

  2. Because ASTPP installs firewalld and fail2ban is configured for iptables.

after fixing the file …/action.d/iptables-allports.conf
fail2ban started working ok with iptables as backend.