I've made a simple fail2ban configuration

The jail.d/default-debian.cong:

[joplin-403]
enabled = true
port = http,https
filter = joplin-403
action = iptables-multiport[name=joplin-403, port="http,https"]
logpath = /var/log/apache2/access.log
backend = polling
bantime = 3600
findtime = 600
maxretry = 3

and filter.d/joplin-403.conf:

[Definition]
failregex = ^<HOST> - .* "(GET|POST) /login.*" 403
ignoreregex =

This is a very basic setup but works for me. I haven't played with different backends yet (polling is probably not the most efficient one, but for low-traffic servers should be OK).

I hope it helps.

2 Likes