fail2ban for SSH in 6 lines
My auth.log had 4k failed logins a day. Set this and it dropped to near zero:
— apt install fail2ban -y
— cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
— In jail.local under [sshd]: enabled = true, maxretry = 3, bantime = 1h, findtime = 10m
— Then bantime.increment = true so repeat offenders get exponentially longer bans
— systemctl restart fail2ban
Check the wall of shame: fail2ban-client status sshd. Try it tonight.
Root Access Daily
@RootAccessDaily
fail2ban for SSH in 6 lines
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.