FAIL2BAN - Filter.d - http-non-exist

From IT-Arts.net


Return to Wiki Index


! Should be customized to your needs !

Filter.d

[Definition]
# http-non-exist.conf
# Requesting non-existent files like backup, .git, or config files
# These are often targeted by attackers to find hidden sensitive files.
#           failregex = ^<HOST>.*(\.git\/|\.env|\.bak|\.tar.gz|\.sql|\.sh|config\.php).*$
           failregex = ^<HOST>.*(\.git\/|\.env|\.bak|\.tar.gz|\.sql|config\.php).*$

ignoreregex =


Jail.conf

[http-non-exist]
enabled  = true
banaction = %(banaction_allports)s
logpath  = /var/log/nginx/*.access.log
maxretry = 1
bantime  = -1
findtime = 3d
backend = polling