http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=370786f9cfd430cb424f00ce4110e75bb1b95a19
见到了下面的内容.
[NETFILTER]: x_tables: add connlimit match
ipt_connlimit has been sitting in POM-NG for a long time.
Here is a new shiny xt_connlimit with:
* xtables’ified
* will request the layer3 module
(previously it hotdropped every packet when it was not loaded)
* fixed: there was a deadlock in case of an OOM condition
* support for any layer4 protocol (e.g. UDP/SCTP)
* using jhash, as suggested by Eric Dumazet
* ipv6 support
*
那么,现在只是支持的为什么不能使用的问题.会提示iptables: Unknown error 18446744073709551615和iptables:Invalid argument
其实很简单,内核是支持了还得我们的iptable支持.所以问题出在这个地方,网上无数的人都在不断的重复的编译.其实只要编译过iptables重新安装就好了.
先到ftp://ftp.netfilter.org/pub/iptables/ 选一个你喜欢的数字做版本号的iptables,最好新点比如1.4.0就支持.1.3.5是不支持的.
解压进入iptables的目录,做最常用的几步
1234cd/root/wh/iptables-1.4.6./configuremakemakeinstall上面就编译完了
需要停止iptables服务
1serviceiptables stop用/usr/local/sbin/中的iptables(新版本)文件替换/sbin/iptables(这个是老版本的)
123cp/usr/local/sbin/iptables/sbin/cp/usr/local/sbin/iptables-restore/sbin/cp/usr/local/sbin/iptables-save/sbin/
[size=1em]
so可能也需要拷贝或做链接[size=1em]cp libxtables.so.10 /lib[size=1em]cp libip4tc.so.0 /lib
[size=1em]cp libip6tc.so.0 /lib
主要是上面三个文件,给整个目录也拿过去也行
测试一下
123iptables-Viptablesv1.4.6servicesiptables restart
注:2.6.23以前的内核的处理方法,请参照<
E点废墟 – Linux xok.la/2008/02/rhel5_iptables_connlimit_success.html