On a Sangoma PBX that hadn’t been updated in a long while, Fail2ban failed to start.
The trick is to start fail2ban and then quickly run
journalctl -xe as specified in the output.
When I did this I got:
[[email protected] ~]# journalctl -xe ... Apr 17 06:48:21 pabx.example.com fail2ban-client: ERROR Found no accessible config files for 'filter.d/apache-api' under /etc/fail2ban ...
This was the solution:
[[email protected] ~]# /var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config
Next it worked:
[[email protected] ~]# service fail2ban start ... Active: active (running) since Mon 2023-04-17 06:52:53 UTC; 6s ago