Question
How to make Fail2Ban monitor a specific website in Plesk and block failure login attempts?
Answer
-
Go to Tools & Settings > IP Address Banning (Fail2Ban) > switch to the Jails tab > click Add Jail.
-
On the Add Jail page, fill in the fields:
-
Name: website-login
-
Filter: apache-auth
-
Action field: iptables-multiport[name=”website-login”, port=”http,https,7080,7081″]
-
Log path: /var/www/vhosts/system/example.com/logs/error_log
/var/log/httpd/*error_logNote: Replace example.com in the above log path with your domain name.
-
-
Click OK.
-
Witch to the Settings tab and make sure Enable intrusion detection is enabled.
-
Once the jail is enabled, all banned IP addresses (if any) will appear on the Banned IP Addresses tab.