Protect your Ubuntu Server with Fail2ban
apt install -y fail2ban
- Default jail name is
sshd
sudo fail2ban-client status sshd
sudo fail2ban-client -vvv set sshd banip x.x.x.x
fail2ban-client set sshd unbanip x.x.x.x
- Default retry ->
max 5
- Default jail perido ->
10 m
- Configure on
/etc/fail2ban/jail.conf
add this on existing configurar
[sshd]
action = iptables[name=SSH, port=22, protocol=tcp]
telegram