linuxserver / fail2ban-confs

These confs are pulled into our fail2ban image: https://github.com/linuxserver/docker-fail2ban
GNU General Public License v3.0
36 stars 11 forks source link

User-defined jails not being loaded? #16

Open ericswpark opened 1 year ago

ericswpark commented 1 year ago

linuxserver.io

Hi, I'm trying to set up Fail2ban on my server. I've plugged Caddy's logs into Fail2ban using the remotelogs volume mapping and am trying to set up the jails so that Fail2ban will read Caddy's logs. However, I'm having a bit of trouble having Fail2ban read the jail configuration file.

The README states not to set up configuration files as .confs as they will be wiped between container restarts, so I copied the jail.d/nginx-bad-request.conf to jail.d/caddy.local. Then, in jail.local, I've added the following lines:

[caddy]
enabled = true
chain = DOCKER-USER
action  = %(known/action)s

However, when Fail2ban loads, the jail is not shown in fail2ban-client status. What am I doing wrong here?

unRAID 6.11.5

Screenshot 2023-05-12 at 10 52 40 PM

If I'm doing something wrong, can the relevant portion be added to the README on how to properly add user-defined jail files in jail.d and have it be loaded by jail.local?