Admin留言 | 贡献
无编辑摘要
Admin留言 | 贡献
无编辑摘要
标签wikieditor
第5行: 第5行:
[[SSH证书登录]]
[[SSH证书登录]]


==fail2ban==


=== 安装 ===
'''apt install fail2ban'''
=== 配置 ===
vim /etc/fail2ban/jail.local<syntaxhighlight lang="bash">
[sshd]               
enabled = true
port = 14213
filter = sshd
logpath = /var/log/auth.log
maxretry = 5
bantime = 12h
</syntaxhighlight>
=== 重启 ===
service fail2ban restart
'''fail2ban-client status sshd'''
=== 日志 ===
/var/log/fail2ban.log