Created
December 23, 2018 15:05
-
-
Save pldubouilh/30ed837d8e1659ea188ace5618352283 to your computer and use it in GitHub Desktop.
fail2ban filter for http 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
# lives in filter.d/ | |
[Definition] | |
failregex = ^<HOST> -.* HTTP/[0-9].[0-9]" 401 | |
ignoreregex = |
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
[caddy] | |
enabled = true | |
filter = caddy | |
logpath = /var/log/caddy_access_logs | |
banTime = 3600 | |
findTime = 600 | |
maxretry = 5 | |
log /var/log/caddy_access_logs {
rotate_size 30
}
that's what I use - I think that's the old caddy syntax, if you have the new syntax at hand I'd be interested :)
Caddy 2 has deprecated common log format, superseeded by a structured log pipeline.
For now the old standard log format is still accessible via
log {
output file /var/log/access.log
format single_field common_log
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are you using for your caddyfile config to generate /var/log/caddy_access_logs?