From Plesk 12 the fail2ban package has been available via the Plesk Control Panel.

 

Step 1:

Login to Plesk


Step 2:

Click "Tools and Settings" > "IP Address Banning (Fail2Ban)"


Step 3:

The first page is the "Blocked IP Addresses"


Step 4:

Click "Trusted IP Address" and add in your own static IP address if you have one, or a range of IP addresses you trust. This will avoid you banning yourself. 


Step 5:

Click "Settings" and check "Enable Intrusion Detection". By default none of the rules are active so blocking has not started yet. You can specify other settings for ban periods etc, set these to your requirements.


Step 6:

Click "Jails"

Check a jail to enable, such as "sshd" and then click "Switch On"


The rule should now be active and it will block connection attempts that result in failed logins, we recommend activating this for at least "ssh". This program should be used sparingly, with incorrect configuration you can block people from visiting your server entirely, even if they are legitimate visitors who accidentally entered in some wrong details.

 

If you find you're unable to connect via a service and have fail2ban active you should turn it off to test your connections or check the logs to see if your IP address is listed.