• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Fail2Ban Wordpress jail issues

Chris1

Regular Pleskian
Hello,

I have a custom jail set up to match the following:

Code:
failregex = <HOST>.*] "POST /wp-login.php

This does work however it seems that when it is running on a server with ~300 domains it struggles to ban IP's efficiently.

Log path is set to:

Code:
logpath = /var/www/vhosts/system/*/logs/access_log

A warning appears in the Fail2Ban section that states:

Code:
Warning: Fail2Ban might not work well if there are many domains and Fail2Ban has to monitor too many log files.

As the "*" would be making it scan ~300 log files, is there a more efficient way of scanning for Wordpress login attempts?

Even though I have it set to 5 attempts before being banned, it can sometimes take up to 30-60 minutes to ban the offending IP even if they are brute forcing with an attempt every second.

Kind regards,
Chris
 
Hi,

I can't help you with getting fail2ban to work any better with ~300 domains, however -- I use a similar filter for failed WP logins and use this failregex:

Code:
failregex = ^<HOST>.*] "POST /wp-login.php HTTP/.*" 200

I think with your filter as it is, you would be catching ALL posts to wp-login.php, rather than just failed logins. A successful login does a 302 redirect, and failed login does a 200.
 
Back
Top