--- rpms/e-smith-openssh/sme9/e-smith-openssh-2.4.0-ssh_autoblock.patch 2014/04/04 23:13:07 1.1 +++ rpms/e-smith-openssh/sme9/e-smith-openssh-2.4.0-ssh_autoblock.patch 2014/04/06 15:32:23 1.2 @@ -8,7 +8,7 @@ + $OUT .=<<"EOF"; + + # Use recent packets match to block SSH from sites generating -+ # $abtries connections within $abtime seconds or $abtries2 in $abtime2 ++ # $abtries connections within $abtime seconds + # Check/clear IP block status in /proc/net/ipt_recent/SSH + /sbin/iptables --new-chain SSH_Autoblock + /sbin/iptables --append SSH_Autoblock -m recent --set --name SSH @@ -46,7 +46,7 @@ + /sbin/iptables --replace SSH_Autoblock 2 -m recent --rcheck --rttl \\ + --seconds $abtime --hitcount $abtries --name SSH -j denylog + # Clear SSH_Autoblock site history too -+ echo clear > /proc/net/xt_recent/SSH ++ echo / > /proc/net/xt_recent/SSH +EOF +}