Files
my-notes/jail.local
2026-03-30 16:09:38 +08:00

27 lines
664 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.
# Fail2ban 本地自定义配置
# 目标SSH 在 20 分钟内失败超过 3 次即封禁;封禁时间从 1 分钟开始,
# 按激进倍率增长,最多到 28 天,并混入最多 3600 秒随机时间。
[INCLUDES]
before = paths-debian.conf
[DEFAULT]
# 20 分钟内累计 4 次失败时触发封禁
findtime = 20m
maxretry = 4
# 初始封禁 1 分钟,后续按倍率递增
bantime = 1m
bantime.increment = true
bantime.rndtime = 3600
bantime.maxtime = 2419200
# 12 级递增,最终封顶到 28 天
bantime.multipliers = 1 2 4 8 16 32 64 128 256 1024 10080 40320
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s