• 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.

Resolved can not add new filter to fail2ban

Brujo

Silver Pleskian
Plesk Guru
I am not able to add a new filter to fail2ban

if I go in plesk panel to: Home > Tools & Settings >IP Address Banning > Jails > managing Filters > add filter > type in name & filtercontent and save I get "Information: The jail filter was added". But i can not see the new added filter in the Plesk Filter List (still just the 12 Filters in the list).

On the filesystem > /etc/fail2ban/filter.d/ i can see the new file but with the extension .local - usulay the file is named like xyz.conf

the output of /usr/local/psa/admin/sbin/f2bmng --get-filters-list
[["apache-auth", "fail2ban"], ["apache-badbots", "fail2ban"], ["apache-common", "fail2ban"], ["common", "fail2ban"], ["plesk-courierlogin", "plesk-fail2ban-configurator"], ["plesk-dovecot", "plesk-fail2ban-configurator"], ["plesk-horde", "plesk-fail2ban-configurator"], ["plesk-panel", "plesk-fail2ban-configurator"], ["plesk-qmail", "plesk-fail2ban-configurator"], ["plesk-roundcube", "plesk-fail2ban-configurator"], ["postfix-sasl", "fail2ban"], ["proftpd", "fail2ban"], ["recidive", "fail2ban"], ["sshd", "fail2ban"], ["test", null]]

test is the name i choosed for the new filter and it seems the second field has "null"

any hint ?
 
Last edited:
The "local" extensions are used to specify non-global settings.

Please read the README file in /etc/fail2ban/ :

...
You may copy required ones into /etc/fail2ban changing file extension from
.conf to .local. Configuration sections with jail definitions from jail.conf
should be copied to jail.local instead.

Please note that all local customizations should be done in .local files.

Please make sure, that you define a new jail as well for the new filter to work. To test a new jail configuration, before activating, you might use "fail2ban-regex" ( example from the command line: "fail2ban-regex /path/to/logfile /etc/fail2ban/filter.d/yourfilter.conf" or "fail2ban-regex /path/to/logfile /etc/fail2ban/filter.d/yourfilter.local".
 
Last edited by a moderator:
Hi,

Apologies for resurrecting an old thread.

I've got the same problem here -
@UFHH01 - I've tried following what you said but still it does not list.

The readme says copy and change from .conf to .local. However, the file gets created as .local Nonetheless I copy the file to /etc/fail2ban.

I run the test regex and it parses ok - finds 880 hits.

I cannot see the filter showing in plesk though.

I manually edit the jail.conf file and the jail shows in plesk but is not working.

How can I get my filter to show in the list?

Thanks

plesk is web admin edition, all up to date on centos 7
 
Back
Top