Code: Select all
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name SSH --rsource -m comment --comment "SSH Protection 1A"
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH --rsource -m comment --comment "SSH Protection 1B" -j DROP
Code: Select all
[root@s2 ~]# modprobe xt_iprange
FATAL: Module xt_iprange not found.
[root@s2 ~]# modprobe xt_recent
FATAL: Module xt_recent not found.
[root@s2 ~]# yum provides /xt_recent.ko
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.tocici.com
* extras: centos.sonn.com
* updates: repos.lax.quadranet.com
Importing additional filelist information
No Matches found
[root@s2 ~]# yum list ipt*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.tocici.com
* extras: mirror.web-ster.com
* updates: repos.lax.quadranet.com
Installed Packages
iptables.i386 1.3.5-9.2.el5_8 installed
iptables-ipv6.i386 1.3.5-9.2.el5_8 installed
iptstate.i386 1.4-2.el5 installed
Available Packages
iptables-devel.i386 1.3.5-9.2.el5_8 base
iptraf.i386 3.0.0-5.el5 base
[root@s2 ~]# cat /etc/redhat-release
CentOS release 5.10 (Final)
[root@s2 ~]# uname -a
Linux s2.*****.*** 2.6.18-371.el5 #1 SMP Tue Oct 1 08:37:57 EDT 2013 i686 i686 i386 GNU/Linux