Changes between Version 5 and Version 6 of SshSecuring
- Timestamp:
- May 18, 2017 11:16:06 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SshSecuring
v5 v6 27 27 28 28 https://we.riseup.net/stefani/iptables-recent-module-and-hit-limits 29 http://thiemonagel.de/2006/02/preventing-brute-force-attacks-using-iptables-recent-matching/ 30 https://www.netfilter.org/documentation/HOWTO/netfilter-extensions-HOWTO-3.html#ss3.16 Recent_patch 3.16 31 http://hostechs.com/2008/09/dropping-a-ddos-attack-using-ttl-and-length-in-iptables/ 32 33 34 Rechaza aquellas ips que intantan 5 conexiones en las ultimos 60 s 29 35 30 36 {{{ 31 37 -A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW -j SSHSCAN 32 38 -A SSHSCAN -m recent --set --name SSH --rsource 33 -A SSHSCAN -m recent --update --seconds 3600 --hitcount 5 --name SSH --rsource -j LOG --log-prefix "Anti SSH-Bruteforce: " --$34 -A SSHSCAN -m recent --update --seconds 3600 --hitcount 5 --name SSH --rsource -j DROP39 -A SSHSCAN -m recent --update --seconds 60 --hitcount 5 --name SSH --rsource -j LOG --log-prefix "Anti SSH-Bruteforce: " --$ 40 -A SSHSCAN -m recent --update --seconds 60 --hitcount 5 --name SSH --rsource -j DROP 35 41 -A SSHSCAN -j ACCEPT 36 42 37 43 }}} 38 44 39 Para quitar una maquina :45 Para quitar una maquina los datos de conexiones recientes: 40 46 41 47 echo "-193.144.202.192" > /proc/self/net/xt_recent/SSH