fail2ban: Fail2ban Middleware does not recognise 200 status code
For some reason my setup does not recognize successful status codes and bans on the 11th request. I also don’t see anything in the logs even though I have enabled DEBUG logging. Setup:
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: fail2ban
spec:
plugin:
fail2ban:
logLevel: DEBUG
rules:
bantime: 30m
enabled: "true"
findtime: 10m
maxretry: "10"
statuscode: 400-499
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: whoami-http
spec:
entryPoints:
- http
routes:
- match: Host(`redacted.com`) || Host(`www.redacted.com`)
kind: Rule
services:
- name: whoami
port: 80
middlewares:
- namespace: traefik
name: fail2ban
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 10
- Comments: 28 (9 by maintainers)
Hi all, I’ve released a new version of this plugin : https://github.com/tomMoulard/fail2ban/releases/tag/v0.8.6
same issue here with traefik
v3.3.3and Fail2Banv0.8.3, every request seems to count against themaxretryvalue regardless of status codeHave the same issue here with Fail2Ban
v0.8.3and Traefikv3.1.6i use v0.8.6 as a local plugin, but i think it still is buggy - got banned when looking at my immich feed with hundreds of http 200s…
Attempting to load it “officially” I’m getting the following error:
It seems the last version which can be loaded from
plugins.traefik.iois 0.8.3…You can load the plugin “locally”. It’s a bit of a hassle and, technically, it’s for developers, but the functionality is there.
Note that the plugin catalog for Traefik still lists
0.8.3as the latest version, and this version can only be used “locally”… From what I can tell the Traefik catalogue checks plugin version availability every 30m and the latest release was yesterday, so it should have been updated by now. Since it hasn’t this suggests there might be something wrong with the latest release.