Fail2Ban
Ew?x$|#SM}zj(C3I[HQ~qzwGknD^@-.%<_htkWAz6*jw!x?(eymMQg6,<+UP5JJG+f&lDwfj5hT={
1. sudo apt install fail2ban -y
2. sudo systemctl status fail2ban.service
3. cd /etc/fail2ban
4. sudo cp jail.conf jail.local
5. sudo nano jail.local
modify bantime, findtime and maxretry
modify enabled = false to true
find [sshd] after add line: enabled = true
find [nginx-http-auth] after add line: enabled = true
6. sudo systemctl enable fail2ban.service
7. sudo systemctl start fail2ban.service
8. sudo systemctl status fail2ban.service
Ew?x$|#SM}zj(C3I[HQ~qzwGknD^@-.%<_htkWAz6*jw!x?(eymMQg6,<+UP5JJG+f&lDwfj5hT={
if u start with error
1. sudo rm jail.local
2. sudo nano jail.local
[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
Ew?x$|#SM}zj(C3I[HQ~qzwGknD^@-.%<_htkWAz6*jw!x?(eymMQg6,<+UP5JJG+f&lDwfj5hT={
maxretry = 5
findtime = 60m
bantime = 60m
Ew?x$|#SM}zj(C3I[HQ~qzwGknD^@-.%<_htkWAz6*jw!x?(eymMQg6,<+UP5JJG+f&lDwfj5hT={
from:
https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-20-04