After sudo apt-get install fail2ban I can’t start the service.
osmc@osmc:/etc/fail2ban$ sudo systemctl status fail2ban -l
● fail2ban.service - LSB: Start/stop fail2ban
Loaded: loaded (/etc/init.d/fail2ban)
Active: active (exited) since Ned 2015-08-23 22:26:18 CEST; 15
min ago
Process: 22580 ExecStop=/etc/init.d/fail2ban stop (code=exited,
status=0/SUCCESS)
Process: 22590 ExecStart=/etc/init.d/fail2ban start (code=exite
d, status=0/SUCCESS)
Kol 23 22:26:18 osmc fail2ban[22590]: Starting authentication fai
lure monitor: fail2banERROR No file(s) found for glob /var/log/a
uth.log
Kol 23 22:26:18 osmc fail2ban[22590]: ERROR Failed during config
uration: Have not found any log file for ssh jail
Kol 23 22:26:18 osmc fail2ban[22590]: failed!
There is no /var/log/auth.log on OSMC - OSMC uses systemd init which does not use traditional text based log files in /var/log. (They are stored in a database accessed via journalctl instead)
Where exactly did you install it from ? Did you add some additional repository in /etc/apt/sources.list ? Because I find it hard to believe that a version shipped in the Debian Jessie repository is not compatible with systemd when systemd is the default init system in Debian Jessie…
@DBMandrake: think its is actually that sad that it still uses legacy textlogs instead of journalctl been looking at my other small devices that are running jessie (upgraded from wheezy) and all of em still have that auth.log file and is still actively using it instead of journalctl
The problem is fail2ban is expecting there to be a /var/log/auth.log - which doesn’t exist by default on a Debian Jessie install since systemd keeps its own log database which is accessed through journalctl.
The problem is with fail2ban not being being up to date with modern init systems, not with OSMC so I would suggest contacting the authors of fail2ban or doing a Google search to see if anyone else has found a workaround for using fail2ban with systemd init.
It’s possible that you might be able install some sort of syslog backward compatibility package to do redundant logging to /var/log/auth.log to work around fail2ban’s shortcomings but that is well out of the scope of what we can support here.
I don’t like idea of 2-step verification.
It complicates my life.
For me iptables (fail2ban uses iptables as well) and a strong password is a decent solution.
I have contacted fail2ban maintainer Yaroslav Halchenko (debian@onerussian.com) who has suggested to me to install devel of neurodebian version from the following url: