diff --git a/config/filter.d/botsearch-common.conf b/config/filter.d/botsearch-common.conf new file mode 100644 index 00000000..65f9da2f --- /dev/null +++ b/config/filter.d/botsearch-common.conf @@ -0,0 +1,19 @@ +# Generic configuration file for -botsearch filters + +[Init] + +# Block is the actual non-found directories to block +block = \/?(|||cgi-bin|mysqladmin)[^,]* + +# These are just convient definitions that assist the blocking of stuff that +# isn't installed +webmail = roundcube|(ext)?mail|horde|(v-?)?webmail + +phpmyadmin = (typo3/|xampp/|admin/|)(pma|(php)?[Mm]y[Aa]dmin) + +wordpress = wp-(login|signup)\.php + +# DEV Notes: +# Taken from apache-botsearch filter +# +# Author: Frantisek Sumsal \ No newline at end of file diff --git a/config/filter.d/nginx-botsearch.conf b/config/filter.d/nginx-botsearch.conf index 6d696de6..567f2f56 100644 --- a/config/filter.d/nginx-botsearch.conf +++ b/config/filter.d/nginx-botsearch.conf @@ -1,6 +1,11 @@ # Fail2Ban filter to match web requests for selected URLs that don't exist # +[INCLUDES] + +# Load regexes for filtering +before = botsearch-common.conf + [Definition] failregex = ^ \- \S+ \[\] \"(GET|POST) \/ \S+\" 404 .+$ @@ -9,20 +14,6 @@ failregex = ^ \- \S+ \[\] \"(GET|POST) \/ \S+\" 404 .+$ ignoreregex = -[Init] - -# Block is the actual non-found directories to block -block = \/?(|||cgi-bin|mysqladmin)[^,]* - -# These are just convient definitions that assist the blocking of stuff that -# isn't installed -webmail = roundcube|(ext)?mail|horde|(v-?)?webmail - -phpmyadmin = (typo3/|xampp/|admin/|)(pma|(php)?[Mm]y[Aa]dmin) - -wordpress = wp-(login|signup)\.php - - # DEV Notes: # Based on apache-botsearch filter #