docker-fail2ban icon indicating copy to clipboard operation
docker-fail2ban copied to clipboard

No file(s) found for glob /var/log/auth.log

Open robert1112 opened this issue 6 years ago • 3 comments

Hi

Thanks for your sharing. I just successfully install the container but when I want to start it, I got the error No file(s) found for glob /var/log/auth.log

I am new to container and Fail2Ban. How can I solve this? Thanks.

robert1112 avatar Feb 06 '19 00:02 robert1112

I am getting the same error.

OS: CentOS 7.6.1810 Kernel: 3.10.0-957.5.1.el7.x86_64

ninjalf2 avatar Feb 16 '19 01:02 ninjalf2

@robert1112 @ninjalf2 I took a quick look on your issue and I found this: https://unix.stackexchange.com/questions/268357/how-to-configure-fail2ban-with-systemd-journal

According to this post, it seems that you don't have syslog or rsyslog on your system which causes that you don't have the auth.log file. This log file is used by my default config for fail2ban to protect your ssh connection.

You can see my jail.local config:

[ssh]
enabled  = true
port = ssh
filter = sshd
# Change this path if needed or remove all config to disable the ssh protection
logpath = /var/log/auth.log 
maxretry = 5

Don't hesitate to replace my default jail.local config with yours by adding the argument

-v /path/to/jail.local:/etc/fail2ban/jail.local

If you think that the default config could be improved, don't hesitate to propose a better config 😊

SuperITMan avatar Feb 16 '19 18:02 SuperITMan

Hi @SuperITMan

First Thank you for your support. I will take a look and take time understanding it. (I am new to Docker and Fail2Ban.)

Is it possible for you to share what pro and con of having Fail2Ban installed as a dock conatiner versus installed on the host? Thank you so much.

robert1112 avatar Feb 19 '19 08:02 robert1112