Created
August 6, 2022 08:10
-
-
Save bensig/416e2cdea0d08bf711411f14eb7a05d1 to your computer and use it in GitHub Desktop.
improved nginx botsearch to include filter for .env files
This file contains hidden or 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
# Fail2Ban filter to match web requests for selected URLs that don't exist | |
# | |
[INCLUDES] | |
# Load regexes for filtering | |
before = botsearch-common.conf | |
[Definition] | |
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) \/<block> \S+\" 404 .+$ | |
^ \[error\] \d+#\d+: \*\d+ (\S+ )?\"\S+\" (failed|is not found) \(2\: No such file or directory\), client\: <HOST>\, server\: \S*\, request: \"(GET|POST|HEAD) \/<block> \S+\"\, .*?$ | |
^<HOST>.*.env .+$ | |
ignoreregex = | |
datepattern = {^LN-BEG}%%ExY(?P<_sep>[-/.])%%m(?P=_sep)%%d[T ]%%H:%%M:%%S(?:[.,]%%f)?(?:\s*%%z)? | |
^[^\[]*\[({DATE}) | |
{^LN-BEG} | |
# DEV Notes: | |
# Based on apache-botsearch filter | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment