Fail2ban兼容性debian debian jessie systemd

Fail2ban debian jessie包不工作:

在新鲜的debian杰西与openssh-server ( 在docker集装箱testing ):

 root@2b29327677c8:/# cat /etc/debian_version 8.3 root@2b29327677c8:/# apt-get install fail2ban root@2b29327677c8:/# apt-cache policy fail2ban fail2ban: Installed: 0.8.13-1 Candidate: 0.8.13-1 Version table: *** 0.8.13-1 0 500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages 100 /var/lib/dpkg/status root@2b29327677c8:/# service fail2ban start Starting authentication failure monitor: fail2banERROR No file(s) found for glob /var/log/auth.log ERROR Failed during configuration: Have not found any log file for ssh jail failed! 

Debian jessie没有/var/log/auth.log

如何使用debian jessie上的fail2ban来观看SSH连接?

看来fail2ban版本0.9.0引入了一个systemd日记的后端:

systemd日记后端已创build。 这对python-systemd有依赖性。 在filter中使用日志匹配有一个“journalmatch”。

然而,Debian 8(jessie)的fail2ban版本为0.8.13 , 而包版本为 0.8.13-1的更新日志并没有表明这个function也会被反向移植。

考虑到systemd的使用,这似乎是一个疏忽,但是会解释你的问题。 (您显然仍然可以监视任何写入普通日志文件的内容。)