Files
deploy.stack/etc/fail2ban/jail.d/recidive.local
T
cnphpbb a13785c6e2 build(etc): 完善 Fail2ban 防爆破配置
- 将 SSH 封禁改为端口无关的 allports 策略
- 新增 Gitea SSH 双链防护和失败日志过滤器
- 补充公共策略、再犯封禁及部署验证文档
2026-11-08 23:37:44 +08:00

14 lines
526 B
Plaintext
Raw 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.
# 再犯 jail:只读 fail2ban 自己的日志,把「封过又重新犯」的 IP 长封,
# 作为 bantime.increment 之外的兜底。
#
# ⚠ 数据源是 fail2ban 自己的日志文件,不是 journald:
# 默认 fail2ban.conf 里 logtarget = /var/log/fail2ban.log,
# "Ban"/"Unban" 行只进这个文件,不进 journal。
# 若某台机器把 logtarget 改成了 SYSLOG/STDOUT,这里要相应改 backend。
[recidive]
enabled = true
logpath = /var/log/fail2ban.log
maxretry = 3
findtime = 1d
bantime = 4w