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