mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
14.03k stars 1.44k forks source link

Fail2ban disabled on v60 #2187

Open cinergi2 opened 2 years ago

cinergi2 commented 2 years ago

After installing mailinabox v60 on a new Ubuntu 22.04 VPS and restoring the backup from the previous installation, Fail2ban is disabled and not loaded. It must be loaded and enabled manually:

sudo service fail2ban start sudo systemctl enable fail2ban

memesalot commented 2 years ago

Can confirm, on a fresh install had to start+enable fail2ban.

kiekerjan commented 2 years ago

When I install fail2ban

$ apt-cache policy fail2ban
fail2ban:
  Installed: (none)
  Candidate: 0.11.2-6
  Version table:
     0.11.2-6 500
        500 http://nl.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

$ sudo apt install fail2ban
[sudo] password for xxx:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  mailx monit sqlite3
After this operation, 2,098 kB of additional disk space will be used.
Get:1 http://nl.archive.ubuntu.com/ubuntu jammy/universe amd64 fail2ban all 0.11.2-6 [394 kB]
Fetched 394 kB in 0s (5,820 kB/s)
Selecting previously unselected package fail2ban.
(Reading database ... 49596 files and directories currently installed.)
Preparing to unpack .../fail2ban_0.11.2-6_all.deb ...
Unpacking fail2ban (0.11.2-6) ...
Setting up fail2ban (0.11.2-6) ...
Processing triggers for man-db (2.10.2-1) ...

$ sudo systemctl status fail2ban
○ fail2ban.service - Fail2Ban Service
     Loaded: loaded (/lib/systemd/system/fail2ban.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:fail2ban(1)

Although vendor preset is enabled, the service is disabled. Don't know why, but a simple sudo systemctl enable fail2ban will enable it.