不能限制与Iptables的连接:“没有链/目标/匹配的名称。”

我试图限制到我的Ubuntu服务器的连接数量在最近的50秒内不超过10个IP地址。 我正在尝试使用iptables来做到这一点。 我从来没有configuration或input任何iptables命令。 这些命令因此失败:

# /sbin/iptables -I INPUT -p tcp --dport 80 -i venet0:0 -m state --state NEW -m recent --set iptables: No chain/target/match by that name. # /sbin/iptables -I INPUT -p tcp --dport 80 -i venet0:0 -m state --state NEW -m recent --update --seconds 50 --hitcount 10 -j "DROP" iptables: No chain/target/match by that name. 

venet0:0确实是一个接口:

 # ifconfig | head -20 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:160410 errors:0 dropped:0 overruns:0 frame:0 TX packets:160410 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:10303872 (10.3 MB) TX bytes:10303872 (10.3 MB) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.2 PtP:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:63699988 errors:0 dropped:0 overruns:0 frame:0 TX packets:44836148 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:61862863168 (61.8 GB) TX bytes:4519224195 (4.5 GB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:*.*.*.* PtP:*.*.*.* Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 

使用这种格式,而不是假设 是venet0:0的IP地址

 -i venet0 -d *.*.*.*