• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Fail2ban 504 Gateway Time-out when opening Banned IP Addresses

Necroman

Basic Pleskian
Hi! I'm having an issue where fail2ban service is running, i can access jails, logs and settings, but i'm having a 504 Gateway Time-out when opening Banned IP Addresses. Also turning on or off jails always gives me an error about time-out and try later to see the changes.

I have read a lot about fail2ban issues, but i'm unable to solve my problem. I'm using Plesk 12.0.18 Update #85 on CentOS 6 x64 and uninstalled Fail2ban and installed again using Plesk Installer. Its seems to be removed and reinstallled ok but after i Enable intrusion detection, the issues remain. I tried going to Fail2ban logs but there aren't any, and i can't find the log file on my server (/etc/fail2ban/fail2ban.conf has a logtarget = SYSLOG if that helps - i also see a /etc/fail2ban.previous folder).

I have read somewhere that i may have EPEL or 3rd party repositories that interfered with fail2ban and so i don't have the right version for Plesk, but as i stated i installed fail2ban using Plesk Installer.

Can someone help? Thanks in advance!
 
Last edited:
Hi Necroman,

depending to your server specifications, to the amount of banned IPs, ... it might be a good idea to increase your values for the sw-cp-server ( own webserver only for the Plesk Control Panel ):

Go to : /etc/sw-cp-server/config

Pls. make a backup of the existing configuration file, before editing!


Increase the values for example to:
Code:
    #keepalive_timeout  0;
    keepalive_timeout  130;
    #tcp_nodelay        on;

...

    fastcgi_max_temp_file_size 0;
    fastcgi_buffers 64 64k;
    fastcgi_buffer_size 128k;

    fastcgi_read_timeout 900;
    fastcgi_send_timeout 900;

    client_max_body_size 3072m;
...


Pls. read and follow as well:




Last, pls. consider to READ your error - logs, to be sure, what the cause of your error is:

/var/log/plesk/sw-cp-server/error_log
/var/log/plesk/panel.log
... and consider as well to change your log - level, to get a better output in your log - files, for investigations:

 
Thanks very much! This solved my problem:
Fail2Ban service gets stuck and IP Address Banning (Fail2Ban) page is not accessible ( KB - article 127495 )

A newer version of fail2ban was installed using epel repository. However, i would like to see Plesk 12.0 supporting the newest version of fail2ban! This would be great!

I also like to add that the steps from article 127495 were not enough to solve the problem completely, because after i removed the newer fail2ban, the plesk supported one had the same issues. I noticed problems when activating jails, because before if i activated a jail that couldn't be activated, it immediately informed me, but this wasn't happening. So after removing fail2ban i also had to remove all files and folder from fail2ban and then installed the plesk version via plesk installed. I have much less jails now, but i think they are all working.

Thanks again!
 
Back
Top