ssh爆破攻击

koopkl Lv2

ssh爆破防范

fail2ban安装

1
2
3
apt update
apt install fail2ban
systemctl enable fail2ban.service

配置fail2ban

1
vim /etc/fail2ban/jail.conf

修改配置项

1
2
3
bantime  = 8760h # 1 year
findtime = 43200m # 1 month
maxretry = 2 # 2 times

重启fail2ban

1
systemctl restart fail2ban.service

查看sshd状态

1
fail2ban-client status sshd
  • Title: ssh爆破攻击
  • Author: koopkl
  • Created at : 2024-04-10 13:33:36
  • Updated at : 2024-04-10 13:48:53
  • Link: https://lime.popla.cc/2024/04/10/ssh爆破保护/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
ssh爆破攻击