Files
laravel-gost-template/deploy/fail2ban/laravel-auth.conf
2026-06-24 17:20:43 +09:00

25 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================================
# fail2ban: блокировка перебора входа на уровне сети (мера ИАФ.6, ЗИС.2)
# Дополняет блокировку учётной записи в приложении блокировкой IP.
#
# Установка:
# 1) filter -> /etc/fail2ban/filter.d/laravel-auth.conf (секция [Definition])
# 2) jail -> /etc/fail2ban/jail.d/laravel-auth.conf (секция [laravel-auth])
# ============================================================================
[Definition]
# Срабатывает на записи о неудачном входе в логах приложения/nginx.
# Настройте под формат вашего лога (RSB: auth.login.failed).
failregex = ^.*"event_type":"auth\.login\.failed".*"ip":"<HOST>".*$
^<HOST> .* "POST /login HTTP.*" 4(0[39]|22|29) .*$
ignoreregex =
[laravel-auth]
enabled = true
port = http,https
logpath = /var/www/app/storage/logs/laravel.log
/var/log/nginx/access.log
maxretry = 5
findtime = 600
bantime = 1800