The Plesk-Wordpress Jail is not configured optimal for banning all attacks to your wordpress Sites. So I have optimized the filter and jail.
In Plesk Gui go to Tools & Settings and in Section Security to IP Address Banning (Fail2Ban):

Then open Jails and Manage Filters:

open the Jail Filter plesk-wordpress and change the content to:
[Definition]
failregex = ^<HOST>.* "POST .*(wp-login.php|xmlrpc.php)([/\?#\\].*)? HTTP/.*" 200|401
ignoreregex =
like this and save settings with OK:

Now open the jail plesk-wordpress and change Settings:

add the following into action:
iptables-multiport[name="plesk-wordpress", port="http,https,7080,7081"]
and this into the field for logpath:
/*access*log
/var/log/apache2/*access.log
/var/www/vhosts/system/*/logs/*access*log.processed
then click OK.
Now the WordPress-Jail is optimized to ban all attacks on wp-login and xmlrpc.
——————————————————-
Picture of Elchinator on Pixabay
4 Gedanken zu „Optimizing plesk-wordpress jail and filter for fail2ban“
Sehr schönes Beispiel, ich nutze generell nur noch Fail2ban, auch um den Backend-Login bei meinen TYPO3 Installationen zu schützen.
Hast Du zufällig auch eine Joomla-Alternative zur Hand?
Eine vernünftige Integration für Joomla Fail2Ban in Plesk habe ich aktuell noch nicht gefunden.
Hallo Daniel, vielen Dank für Dein Feedback und Deine Unterstützung. Von Haus aus logt Joomla nicht so, das man die Einträge verwerten könnte, dazu brauchst Du ein Plugin und dann kannst Du einen entsprechenden Filter mit dazugehörigen Jail „basteln“ Näheres dazu findest Du hier.
Gruß
Markus
Hallo Markus,
Danke für den Link!
Ich schaue mir das mal genauer an.
Mach bitte weiter mit Deiner Arbeit hier, so manche Anleitung war in den letzten Tagen echt Gold wert!
Grüße, Daniel