• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Issue Can't enable plesk-modsecurity jail for fail2ban

Oldiesmann

Basic Pleskian
I just moved to a new VPS and am finalizing Plesk configuration. The monitoring thing says that "fail2ban" is switched off. In reality only the "plesk-modsecurity" jail is inactive, but trying to activate it fails with the following message:
Unable to switch on the selected jails: f2bmng failed: 2022-04-02 15:27:49,307 fail2ban [410989]: ERROR NOK: ("Failed to initialize any backend for Jail 'plesk-modsecurity'",)
ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload', '--if-exists', 'plesk-modsecurity']' returned non-zero exit status 255.
ERROR:__main__:Failed to reload following jails due to errors in configuration: plesk-modsecurity.
What does this mean and how do I fix it? I did find a link to what appears to be a relevant support article on Google but clicking the link just gives me an error saying I'm not authorized to access that page and I can't find it via the search in the support center
 
I guess this is the article you've found:


But looking at the error you got, this is probably the cause of the problem:

"Failed to reload following jails due to errors in configuration: plesk-modsecurity"

Can you compare these files with the old VPS?

/etc/fail2ban/filter.d/plesk-modsecurity.conf
/etc/fail2ban/jail.d/plesk.conf
 
I deleted that VPS because I no longer needed it, so I can't compare the files. Should I uninstall and reinstall fail2ban and ModSecurity?
 
What OS are you using?
Can you show the versions of mod_security and fail2ban you've installed?
 
Ubuntu 20.04, ModSecurity 2.9. Not sure about fail2ban but I'm assuming it's 0.11.2 since that's the latest version
 
Any suggestions? I get a similar error if I try to add a new jail (for instance one banning IPs for failed login to the mail server)
 
I would suggest you contact Plesk Support Team:


If your license does not include Plesk support, you still can get Plesk Support, it's the free for the first month.

Just follow the link to the store and don't forget to cancel it when the issue has been solved:

Screenshot 2022-04-04 at 15.25.53.png
 
Back
Top