我正在使用Raspberry Pi。为了减少SD卡上的I / O,我将所有重要的日志文件符号链接到外部USB安装的硬盘。
示例:
ln -s /media/usb-device/logs/auth.log /var/log/auth.log
日志记录工作正常。但是fail2ban似乎并不喜欢这样。当我在/etc/fail2ban/jail.local
文件中启用ssh-monitoring时,
# [sshd]
enabled = true
bantime = 3600
执行此命令systemctl restart fail2ban.service
时,fail2ban崩溃
我试图对路径进行硬编码:
# logpath = %(sshd_log)s
logpath = /media/usb-devive/logs/auth.log
但是fail2ban会抛出同样的错误:
fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-04-28 20:42:33 CEST; 45s ago
Docs: man:fail2ban(1)
Process: 3014 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=0/SUCCESS)
Process: 3045 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
Main PID: 658 (code=killed, signal=TERM)
Apr 28 20:42:33 raspberrypi systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Apr 28 20:42:33 raspberrypi systemd[1]: Stopped Fail2Ban Service.
Apr 28 20:42:33 raspberrypi systemd[1]: fail2ban.service: Start request repeated too quickly.
Apr 28 20:42:33 raspberrypi systemd[1]: Failed to start Fail2Ban Service.
Apr 28 20:42:33 raspberrypi systemd[1]: fail2ban.service: Unit entered failed state.
Apr 28 20:42:33 raspberrypi systemd[1]: fail2ban.service: Failed with result 'exit-code'.
有什么想法吗?
答案 0 :(得分:0)
logpath
中的“ devive”拼写错误