Symptoms
Fail2Ban is installed and enabled in Plesk.
When opening Plesk or a website or logging in to an email account via webmail from a specific IP address (for example, 203.0.113.2), the connection fails:
ERR_CONNECTION_TIMED_OUT
ERR_CONNECTION_REFUSED
This site can’t be reached
203.0.113.2 took too long to respond.From other IP addresses Plesk, websites and email accounts are accessible.
The following error message may appear in Plesk during some operation:
Request to backend API failed with error: Network error
The IP address 203.0.113.2 can be found in Plesk at Tools & Settings > IP Address Banning (Fail2Ban) > Banned IP Addresses or via CLI:
# plesk bin ip_ban --banned
Banned IP addresses:
203.0.113.2 plesk-panel Jan 1, 2020
Cause
The user's IP address has been banned by Fail2Ban.
Resolution
Unban the IP-address or add it to trusted IP-addresses
Log in to Plesk from a different IP address (another device).
Go to Tools & Settings > IP Address Banning (Fail2Ban) > Banned IP Addresses.
Select the user's IP address and click Unban or Move to Trusted IPs.
Connect to the Plesk server via SSH.
Unban the user's IP address:
# plesk bin ip_ban --unban 203.0.113.2
SUCCESS: The selected IP addresses were unbanned.Add the IP address to the list of trusted IP addresses:
# plesk bin ip_ban --add-trusted 203.0.113.2
Additional Information
To find out why an IP address got banned by Fail2Ban, see this KB article.