-
-
Save MerNat/77e581422a42602799008d5816d8b2d2 to your computer and use it in GitHub Desktop.
Traefik fail2ban
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fail2ban/filter.d/traefik-auth.conf | |
[Definition] | |
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fail2ban/filter.d/traefik-botsearch.conf | |
[INCLUDES] | |
before = botsearch-common.conf | |
[Definition] | |
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) \/<block> \S+\" 404 .+$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/fail2ban/jail.d/traefik.conf | |
[traefik-auth] | |
enabled = true | |
logpath = %(traefik_access_log)s | |
port = http,https | |
[traefik-botsearch] | |
enabled = true | |
logpath = %(traefik_access_log)s | |
maxretry = 1 | |
port = http,https | |
[traefik-badbots] | |
enabled = true | |
filter = apache-badbots | |
logpath = %(traefik_access_log)s | |
maxretry = 1 | |
port = http,https |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment