Blog

Domingo, 10 Marzo 2019 22:44

Proteger SSH con fail2ban

Written by 
Rate this item
(0 votes)

Antes de nada, instalar fail2ban

En Debian o Ubuntu

sudo apt update

sudo apt install fail2ban

 

En Centos

sudo yum -y install epel-release

sudo yum -y install fail2ban

 

Crear el fichero jail.local

cp /etc/fail2ban/jain.conf /etc/fail2ban/jail.local

 

Añadir el siguiente bloque en el fichero jail.local. Hay que poner también ssh a enabled = true

[sshd]

enabled = true

banaction = iptables-multiport

maxretry = 10

findtime = 43200

bantime = 86400

 

Ejecutar

sudo systemctl restart fail2ban

Read 241 times

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.