Update won't start Fail2ban if roundcube log is missing.  [SOLVED]

Have you discovered a bug? Tell us about it.
Post Reply
User avatar
BasHeijermans
KeyHelp Translator
Posts: 158
Joined: Mon 20. Jun 2022, 12:01
Location: Heppen Belgium
Contact:

Update won't start Fail2ban if roundcube log is missing.

Post by BasHeijermans »

Problem found after the update.

First: Fail2ban won't start. The reason is this:

Code: Select all

root@sprintweb:/etc/fail2ban# /usr/bin/fail2ban-server -xf start
2022-07-16 15:56:14,052 fail2ban                [9476]: ERROR   Failed during configuration: Have not found any log file for keyhelp-roundcube jail
2022-07-16 15:56:14,087 fail2ban                [9476]: ERROR   Async configuration of server failed
Simply put, the log is missing, unless you access webmail, it won't find the log and it won't start.

The keyhelp server should check if the file is present, if not, create an empty one else Fail2ban will not start.
Greetings Bas.

Ik heb KeyHelp naar het Nederlands vertaald, contacteer me als er translatie fouten zijn.
(I have translated KeyHelp into Dutch, contact me if there are translation errors.)
Next version 24 of KeyHelp 100% translated.
User avatar
Alexander
Keyweb AG
Posts: 3813
Joined: Wed 20. Jan 2016, 02:23

Re: Update won't start Fail2ban if roundcube log is missing.

Post by Alexander »

There is a reason, why the additional jails defined in /etc/fail2ban/jail.d/keyhelp.local are disable by default.
For example this one.

Only keyhelp-phpmyadmin and ssh are enabled by default, an a fresh system.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
BasHeijermans
KeyHelp Translator
Posts: 158
Joined: Mon 20. Jun 2022, 12:01
Location: Heppen Belgium
Contact:

Re: Update won't start Fail2ban if roundcube log is missing.

Post by BasHeijermans »

I set them back to original.
Greetings Bas.

Ik heb KeyHelp naar het Nederlands vertaald, contacteer me als er translatie fouten zijn.
(I have translated KeyHelp into Dutch, contact me if there are translation errors.)
Next version 24 of KeyHelp 100% translated.
User avatar
Alexander
Keyweb AG
Posts: 3813
Joined: Wed 20. Jan 2016, 02:23

Re: Update won't start Fail2ban if roundcube log is missing.

Post by Alexander »

You can keep the "keyhelp-recidive" enabled. This is should only be dangerous, if fail2ban is running in debug mode ;).
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Alexander
Keyweb AG
Posts: 3813
Joined: Wed 20. Jan 2016, 02:23

Re: Update won't start Fail2ban if roundcube log is missing.  [SOLVED]

Post by Alexander »

Found a link to this old thread in my ToDo list, and have some new info on it.

Due to Debian 12 and the changes introduced by the OS vendor, I switched completely (within the KeyHelp code) to journalctl wherever possible, instead of relying on "real" log files. This will be the case on all supported OS.

As part of the necessary work on this issue, I also updated "/etc/fail2ban/jail.d/keyhelp.local" to use the system backend instead of the log file path. So the reason for the problem (missing log file) will not be possible at all with the upcoming KeyHelp version, because 'a missing log file' will not be possible anymore.

-> marked as solved.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply