Fail2ban not starting?

I just got my MIAB server up and running after coming from hMailServer. First thing is I’m not seeing fail2ban running. When I run systemctl -l status fail2ban, I get the following output. One thing I noticed was it’s looking for nextcloud… which I removed from the start.sh script (I already have nextcloud and roundcube installed elsewhere).

Does F2B NEED nextcloud to run? How can I get around this? Thanks.

I’m running 0.54 of MIAB and Ubuntu 18.04.6 LTS.

● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-10-05 16:58:27 EDT; 4min 8s ago
     Docs: man:fail2ban(1)
  Process: 6824 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255)
  Process: 6818 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)
 Main PID: 6824 (code=exited, status=255)

Oct 05 16:58:26 mymailserver.com systemd[1]: Starting Fail2Ban Service...
Oct 05 16:58:26 mymailserver.com systemd[1]: Started Fail2Ban Service.
Oct 05 16:58:27 mymailserver.com fail2ban-server[6824]:  No file(s) found for glob /home/user-data/owncloud/nextcloud.log
Oct 05 16:58:27 mymailserver.com fail2ban-server[6824]:  Failed during configuration: Have not found any log file for miab-owncloud jail
Oct 05 16:58:27 mymailserver.com fail2ban-server[6824]:  Async configuration of server failed
Oct 05 16:58:27 mymailserver.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/n/a
Oct 05 16:58:27 mymailserver.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.

MiaB is developed to run unmodified. These sorts of changes will not only cause problems, but get overwritten.

As openletter already noticed, you’ll encounter issues on upgrading, because the upgrade/installation script will not take your changes into account. There might also be nextcloud integrations used by other parts of mail-in-a-box that will fail (silently).

That said, this is the Unsupported Modifications territory. :innocent: so, to get around this, use

sudo -u www-data touch /home/user-data/owncloud/nextcloud.log

This creates an empty log file, satisfying fail2ban.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.