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

Question Fail2ban no ban ... ?

JmRy

New Pleskian
Hello,

I have no banned IP while many failed connection attempts on postfix.

I think fail2ban is not working properly on my server. (Obsidian 18.0.34 on Debian 10)

Its settings are the original ones and the Plesk jails are enabled

Code:
fail2ban-client status
Status
|- Number of jail:      11
`- Jail list:   plesk-apache, plesk-apache-badbot, plesk-dovecot, plesk-modsecurity, plesk-panel, plesk-postfix, plesk-proftpd, plesk-roundcube, plesk-wordpress, recidive, ssh

But I get warnings at startup

Code:
2021-04-10 12:11:08,775 7F8064F92740 ERROR Could not read config files: /etc/fail2ban/jail.conf, /etc/fail2ban/jail.d/plesk.conf
 2021-04-10 12:11:08,775 7F8064F92740 WARNI 'filter' not defined in 'plesk-apache'. Using default one: ''
 2021-04-10 12:11:08,775 7F8064F92740 WARNI No filter set for jail plesk-apache
 2021-04-10 12:11:08,775 7F8064F92740 WARNI 'backend' not defined in 'plesk-apache'. Using default one: 'auto'
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'filter' not defined in 'plesk-apache'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'action' not defined in 'plesk-apache'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI No actions were defined for plesk-apache
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'filter' not defined in 'plesk-apache-badbot'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI No filter set for jail plesk-apache-badbot
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'backend' not defined in 'plesk-apache-badbot'. Using default one: 'auto'
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'filter' not defined in 'plesk-apache-badbot'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'action' not defined in 'plesk-apache-badbot'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI No actions were defined for plesk-apache-badbot
 2021-04-10 12:11:08,776 7F8064F92740 WARNI 'filter' not defined in 'plesk-dovecot'. Using default one: ''
 2021-04-10 12:11:08,776 7F8064F92740 WARNI No filter set for jail plesk-dovecot
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'backend' not defined in 'plesk-dovecot'. Using default one: 'auto'
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'filter' not defined in 'plesk-dovecot'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'action' not defined in 'plesk-dovecot'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI No actions were defined for plesk-dovecot
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'filter' not defined in 'plesk-modsecurity'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI No filter set for jail plesk-modsecurity
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'backend' not defined in 'plesk-modsecurity'. Using default one: 'auto'
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'filter' not defined in 'plesk-modsecurity'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'action' not defined in 'plesk-modsecurity'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI No actions were defined for plesk-modsecurity
 2021-04-10 12:11:08,777 7F8064F92740 WARNI 'filter' not defined in 'plesk-panel'. Using default one: ''
 2021-04-10 12:11:08,777 7F8064F92740 WARNI No filter set for jail plesk-panel
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'backend' not defined in 'plesk-panel'. Using default one: 'auto'
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'filter' not defined in 'plesk-panel'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'action' not defined in 'plesk-panel'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI No actions were defined for plesk-panel
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'filter' not defined in 'plesk-postfix'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI No filter set for jail plesk-postfix
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'backend' not defined in 'plesk-postfix'. Using default one: 'auto'
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'filter' not defined in 'plesk-postfix'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'action' not defined in 'plesk-postfix'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI No actions were defined for plesk-postfix
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'filter' not defined in 'plesk-proftpd'. Using default one: ''
 2021-04-10 12:11:08,778 7F8064F92740 WARNI No filter set for jail plesk-proftpd
 2021-04-10 12:11:08,778 7F8064F92740 WARNI 'backend' not defined in 'plesk-proftpd'. Using default one: 'auto'
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'filter' not defined in 'plesk-proftpd'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'action' not defined in 'plesk-proftpd'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI No actions were defined for plesk-proftpd
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'filter' not defined in 'plesk-roundcube'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI No filter set for jail plesk-roundcube
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'backend' not defined in 'plesk-roundcube'. Using default one: 'auto'
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'filter' not defined in 'plesk-roundcube'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'action' not defined in 'plesk-roundcube'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI No actions were defined for plesk-roundcube
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'filter' not defined in 'plesk-wordpress'. Using default one: ''
 2021-04-10 12:11:08,779 7F8064F92740 WARNI No filter set for jail plesk-wordpress
 2021-04-10 12:11:08,779 7F8064F92740 WARNI 'backend' not defined in 'plesk-wordpress'. Using default one: 'auto'
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'filter' not defined in 'plesk-wordpress'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'action' not defined in 'plesk-wordpress'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI No actions were defined for plesk-wordpress
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'filter' not defined in 'recidive'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI No filter set for jail recidive
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'backend' not defined in 'recidive'. Using default one: 'auto'
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'filter' not defined in 'recidive'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'action' not defined in 'recidive'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI No actions were defined for recidive
 2021-04-10 12:11:08,780 7F8064F92740 WARNI 'filter' not defined in 'ssh'. Using default one: ''
 2021-04-10 12:11:08,780 7F8064F92740 WARNI No filter set for jail ssh
 2021-04-10 12:11:08,781 7F8064F92740 WARNI 'backend' not defined in 'ssh'. Using default one: 'auto'
 2021-04-10 12:11:08,781 7F8064F92740 WARNI 'filter' not defined in 'ssh'. Using default one: ''
 2021-04-10 12:11:08,781 7F8064F92740 WARNI 'action' not defined in 'ssh'. Using default one: ''
 2021-04-10 12:11:08,781 7F8064F92740 WARNI No actions were defined for ssh

and when I test the postix jail, it fails

Code:
fail2ban-regex -v /var/log/maillog /etc/fail2ban/filter.d/postfix.conf
Running tests
=============
Use   failregex filter file : postfix, basedir: /etc/fail2ban
ERROR: failed to load filter /etc/fail2ban/filter.d/postfix.conf

The filter file exist !! why not load ?

I don't understand these warnings and this error during this regex test

Can you help me ? Thanks :)
 
Maybe file access permissions are wrong. I think a good approach would be to remove the Fail2Ban component from Plesk through the Plesk upgrades page, then re-add it later.
 
Back
Top