fail2ban/config/filter.d/nginx-bad-request.conf

15 lines
416 B
Plaintext
Raw Normal View History

2020-06-06 17:51:46 +00:00
# Fail2Ban filter to match bad requests to nginx
#
[Definition]
# The request often doesn't contain a method, only some encoded garbage
# This will also match requests that are entirely empty
failregex = ^<HOST> - \S+ \[\] "[^"]*" 400
2020-06-06 17:51:46 +00:00
datepattern = {^LN-BEG}%%ExY(?P<_sep>[-/.])%%m(?P=_sep)%%d[T ]%%H:%%M:%%S(?:[.,]%%f)?(?:\s*%%z)?
^[^\[]*\[({DATE})
{^LN-BEG}
# Author: Jan Przybylak