ironfeather fail2ban custom jail

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1773
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
ironfeather fail2ban custom jail

Post by Stevyn » Thu Jun 06, 2019 3:40 pm

File /etc/fail2ban/filter.d/apache-ironfeather.conf

Code: Select all

# Fail2Ban configuration file
# Bans scanning for non-existing phpMyAdmin installations and other BS on your webhost.
#
[Definition]
# Option: failregex
# Notes: Regexp to match often and not available phpmyadmin paths.
# Values: TEXT
#
failregex = [[]client <HOST>[]] (File does not exist|not found or unable to stat): .*(PMA|phpmyadmin|myadmin|mysql|mysqladmin|sqladmin|mypma|admin|xampp|mysqldb|mydb|db|pmadb|phpmyadmin1|myadmin2|wp-content|wp-login.php)

# Option: ignoreregex
# Notes .: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =


File /etc/fail2ban/jail.local

Code: Select all

[apache-ironfeather]
enabled = true
maxretry = 1
journalmatch =
backend = polling
logpath =%(apache_error_log)s
bantime = 172800
findtime = 172800
source: https://www.tartarefr.eu/proteger-apache-avec-fail2ban/
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply