Docker NCP with Fail2Ban

Hi,

I“ve just installed raspbian on my Raspberry Pi 3b+.
Now NCP is running with docker and evertrhing works like it should.

Recently I did some configuration to the server settings for hardening
and lastly tried to setup fail2ban in combination with docker. I read the manual
found that I have to add a new filter and action file.

Unfortunately I couldnt find out exactly how these files should look like.

Can anyone help me out with this?

Thank you in advance.

My fail2ban filter for Nextcloud looks like this:

cat /etc/fail2ban/filter.d/nextcloud.conf
[INCLUDES]
before = common.conf
[Definition]
failregex = Login failed.Remote IP.ā€˜ā€™
ignoreregex =

Pasted my jail.local here

You’ll need to comment out the ssh section in jail.local if sshd is not enabled.

Thank you for reply.

The filter for nextcloud looks very similar to yours with a few arguments more.
I think the problem lies within the nextcloud.conf file in …/fail2ban/action.d.
The input chain must be changed to forward chain in some ways. That is what I found
out with some research, but I couldn“t get it to work.