El 2005-02-04 a las 14:27 +0100, jose maria escribió:
* Swatch es un analizador de logs al igual y creo que inferior a logsurfer, vamos que no soluciona el asunto.
* Con iptables, parche 3.16
iptables -A FORWARD -m recent --name mamonssh --rcheck --seconds 60 -j DROP iptables -A FORWARD -p tcp -i eth0 --dport 22 -m recent --name mamonssh \ --set -j DROP
Acaban de poner un método muy interesante - no está fino, pero es una idea - y es del mismo estilo que el tuyo: |Date: Fri, 4 Feb 2005 09:56:05 -0500 |From: Bruce Smith |Subject: Re: [suse-security] SSH attacks. | |... | |I'll check into swatch when I get time, but for now I'll share the |iptables rules I ended up with with this list as my thanks to |everyone. This will block any IP for 60 seconds that tries to connect |5 or more time in a one minute time frame (along with logging it). |It's easy to test, just login multiple times and ALL the connections |will freeze for awhile when you hit the login limit: | | iptables -A INPUT -p tcp --syn --dport 22 -i eth0 -m recent --name sshattack --set | iptables -A INPUT -m recent --name sshattack --rcheck --seconds 60 --hitcount 5 -j LOG --log-prefix 'SSH attack: ' | iptables -A INPUT -m recent --name sshattack --rcheck --seconds 60 --hitcount 5 -j DROP Parece que usa el modulo del kernel "recent", y la idea es bloquear y registrar cualquier IP que ha intentado conectarse 5 o más veces en el último minuto. La pega es que también cuenta las conexiones válidas, así que un scp tendría problemas. Más no puedo decir, casi no se nada de iptables. -- Saludos Carlos Robinson