====== Fail2ban ====== ===== Jails personnalisées ===== ==== Filtrer les erreurs HTTP ==== Cette conf vaut pour Nginx et Apache. - Créer le filtre /etc/fail2ban/filter.d/http-errors.conf : [Definition] failregex = ^.*"(GET|POST).*" (400|401|403|404) .*$ - Ajouter une jail pour ce filtre dans /etc/fail2ban/jail.d/jails-custom.conf : [http-errors] enabled = true port = http,https filter = http-errors logpath = /var/log/nginx/access.log # ou /var/log/apache2/access.log bantime = 1d findtime = 4h maxretry = 10