diff --git a/HowtoFail2Ban.md b/HowtoFail2Ban.md index 18f79834..76d5cfbd 100644 --- a/HowtoFail2Ban.md +++ b/HowtoFail2Ban.md @@ -393,6 +393,48 @@ maxretry = 300 findtime = 300 ~~~ +### 401 + +/etc/fail2ban/filter.d/nginx-401.conf : + +~~~ +[Definition] +failregex = -.*"GET.*HTTP.* 401 .* +~~~ + +Jail : + +~~~ +[nginx-401-allvhosts] +enabled = true +port = http,https +filter = nginx-401 +logpath = /home/*/log/access.log tail +maxretry = 30 +findtime = 3600 +~~~ + +### 403 + +/etc/fail2ban/filter.d/nginx-403.conf : + +~~~ +[Definition] +failregex = -.*"GET.*HTTP.* 403 .* +~~~ + +Jail : + +~~~ +[nginx-403-allvhosts] +enabled = true +port = http,https +filter = nginx-403 +logpath = /home/*/log/access.log tail +maxretry = 30 +findtime = 3600 +~~~ + ## webapps ### Wordpress sans plugin @@ -682,10 +724,6 @@ filter = pm2-auth-failure logpath = /home/APPPATH/.pm2/logs/api-error.log tail maxretry = 30 findtime = 3600 -# A supprimmer une fois periode de test terminé -banaction = none -action = %(action_mailwhoisonly)s - ~~~ ## Munin