if anyone needs something like this here is how to do it in Fail2Ban:
1) create new conf file in filter.d/ folder of your fail2ban (in ubuntu: /etc/fail2ban/filter.d/) ... or just copy existing one with new file name:
cp apache-auth.conf apache-newfilter.conf
edit apache-newfilter.conf so it looks like this
Code:
[Definition]
failregex = [[]client <HOST>[]] File does not exist:
ignoreregex =
2) edit jail.local in your Fail2Ban folder (Ubuntu: /etc/fail2ban/jail.local)
add section:
Code:
[apache-newfilter]
enabled = true
port = http,https
filter = apache-newfilter
logpath = /var/log/apache*/*error.log
maxretry = 4
3) - enabled - change true to false to dissable filter
- filter - shouldn't be longer than 21 characters so something like apache-filedoesnotexist wont work because fail2ban creates chain in iptables: fail2ban-apache-filedoesnotexist and that is more than 30 characters
Recent comments
14 hours 44 min ago
15 hours 44 min ago
19 hours 31 min ago
20 hours 45 min ago
1 day 21 min ago
1 day 7 hours ago
1 day 16 hours ago
1 day 18 hours ago
2 days 9 hours ago
2 days 11 hours ago