- 论坛徽章:
- 0
|
不知道可不可以和IPRANGE一起匹配使用,我试试先!
iptables -I FORWARD 18 -m iprange --src-range 192.168.1.12-192.168.80 -m hashspeed \! --hashspeed-bytes 256K --hashspeed-mode dstip --hashspeed-name dlimit -j DROP
我的编译成功了,但是运行上面这一句提示:iptables: No chain/target/match by that name
可是用iptables -m hashspeed --help 显示
hashspeed v1.3.8 options:
required parameter: <hashspeed-name> <hashspeed-mode> <hashspeed-bytes|hashspeed-packets>
only one revert parameter is accepted, meaning ! hashspeed-bytes or ! hashspeed-packets or ! <hashspeed-bytes || hashspeed-packets>
[--hashspeed-bytes <avg>] Bytes per second unless followed by K M postfixes
[--hashspeed-bytes-burst <num>] max bytes a burst, default avg*0.1
[--hashspeed-packets <num>] [Packets per second]
[--hashspeed-packets-burst <num>] max packets a burst, default 5
--hashspeed-mode <mode> mode is a comma-separated list of
dstip,srcip
--hashspeed-name <name> name for /proc/net/ipt_hashspeed/
[--hashspeed-htable-size <num>] number of hashtable buckets
[--hashspeed-htable-max <num>] number of hashtable entries
[--hashspeed-htable-gcinterval] interval between garbage collection runs
[--hashspeed-htable-expire] after which time are idle entries expired?
这应该是正常安装上去了呀!
下面是安装记录
[root@mack2050 hashspeed-0.1]# make
make -C /lib/modules/2.6.22.8/build M=/root/hashspeed-0.1 modules
make[1]: Entering directory `/usr/src/linux-2.6.22.8'
CC [M] /root/hashspeed-0.1/ipt_hashspeed.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/hashspeed-0.1/ipt_hashspeed.mod.o
LD [M] /root/hashspeed-0.1/ipt_hashspeed.ko
make[1]: Leaving directory `/usr/src/linux-2.6.22.8'
cc -O2 -Wall -DIPTABLES_VERSION=\"1.3.8\" -I/usr/src/iptables-1.3.8/include -fPIC -c libipt_hashspeed.c
cc -shared -o libipt_hashspeed.so libipt_hashspeed.o
[root@mack2050 hashspeed-0.1]# make install
cp ipt_hashspeed.ko /lib/modules/2.6.22.8/kernel/net/ipv4/netfilter/
cp libipt_hashspeed.so /lib/iptables/
请大家指点,谢谢!
[ 本帖最后由 mack2050 于 2008-1-2 20:01 编辑 ] |
|