Run command after fail2ban block

Hello,

Actually I’m working with FreePBX 12.0.76.4 and have configured fail2ban to block the IP addresses when try to access to extension by brute force, after work send email by default, i would like to know if is possible add a custom command when do this, i would to block the ipaddress by iptables also.

Thank you advance, best regards.

That is exactly how fail2ban works, it adds an entry to iptables to ban the offending IP for “bantime”, if setup properly it will also email you of it’s action.

So what is not working for you?

1 Like