mirror of
https://github.com/fruworg/fruworg.github.io.git
synced 2024-11-16 09:27:17 +03:00
526 B
526 B
title | description | date | tags | ||
---|---|---|---|---|---|
fail2ban для SSH | Защита от брута пароля к SSH | 2022-11-29T13:41:00+05:00 |
|
Установка пакета fail2ban
apt -y install fail2ban
Правило для ssh
[sshd]
enabled = true
port = <ssh-port>
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
findtime = 300
bantime = 3600
# /etc/fail2ban/jail.d/sshd.conf
Перезапуск сервиса fail2ban
systemctl restart fail2ban