I had issues with fail2ban on my system so I installed a new one to see how the default installation behaves.
I have just installed a fresh copy of FreePBX distro 6.12.65 (64Bits) without making any further updates.
System admin shows version 126.96.36.199.
I tried banning myself while trying to login to the web UI (with https). Although I tried many times and several combinations (correct username with wrong password, correct user name with blank password, wrong username & password) the fail2ban mechanism is not banning my IP. (I am connecting from a remote machine).
I then tried SIP and it does work.
I then checked the /var/log/fail2ban.log and I saw this error:
2015-07-31 08:07:00,524 fail2ban.jail : INFO Jail ‘apache-badbots’ started
2015-07-31 08:07:00,535 fail2ban.actions.action: ERROR iptables -N fail2ban-BadBots
iptables -A fail2ban-BadBots -j RETURN
iptables -I INPUT -p all -m multiport --dports http,https -j fail2ban-BadBots returned 200
2015-07-31 08:07:00,538 fail2ban.jail : INFO Jail ‘pbx-gui’ started
2015-07-31 08:07:00,538 fail2ban.filter : WARNING Unable to find a corresponding IP address for ::1
Note that I am not using ipv6 (I just did not enable it during the Network Configuration while installing the ISO.
What am I doing wrong? I obviously want to ban anyone who access the web interface (with http & https) and fails to provide correct logins.
Any help is welcome.