- install fail2ban
$ sudo apt update $ sudo apt install fail2ban
- edit configuration
$ sudo vi /etc/fail2ban/jail.conf
[sshd] enabled = true port = ssh maxretry = 5 # 5 attempts not permitted findtime = 600 # within 10 minutes bantime = 3600 # ban 1 hour logpath = %(sshd_log)s backend = %(sshd_backend)s
- unban an ip address
$ sudo fail2ban-client set sshd unbanip IP_ADDRESS
No comments:
Post a Comment