LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 775|回复: 1

(求助)debian 路由hashspeed 限速问题

[复制链接]
发表于 2009-11-27 18:15:29 | 显示全部楼层 |阅读模式
编译内核,模块,都已通过后。

脚本如下:
这是我iptables.sh脚本中的hashspeed部分
############ QOS go ###########
iptables -N QOS
iptables -A FORWARD -i eth0 -p ALL -m hashspeed \! --hashspeed-bytes 64K --hashspeed-mode srcip --hashspeed-name slimit -j QOS
iptables -A FORWARD -o eth0 -p ALL -m hashspeed \! --hashspeed-bytes 128K --hashspeed-mode dstip --hashspeed-name dlimit -j QOS
iptables -A QOS -j DROP

但是问题来了,开机自启动此脚本时,就提示,错误命令:
iptables[2458]:segfault at 0 ip 7fc90e235a90 sp 7fff35604708 error 4 in libc-2.7.so[7fc90e1bb000+14a000]
/root/iptables.sh line 138: 2458 Segmentation fault iptables -A FORWARD -i eth0 -p ALL -m hashspeed \! --hashspeed-bytes 64K --hashspeed-mode srcip --hashspeed-name slimit -j QOS

iptables[2459]:segfault at 0 ip 7fc90e235a90 sp 7fff35604708 error 4 in libc-2.7.so[7fc90e1bb000+14a000]
/root/iptables.sh line 139:2459 Segmentation fault iptables -A FORWARD -o eth0 -p ALL -m hashspeed \! --hashspeed-bytes 128K --hashspeed-mode dstip --hashspeed-name dlimit -j QOS

可见就是这二条命令的问题。

但是以ROOT进入后我执行此脚本是通过的,不过执行后就会跳出二条命令,如下:
ipt_hashseed:create hashtable [size(3583)]
ipt_hashseed:create hashtable [size(3583)]

之后我在查iptables -L -n 结果成功了,可以通过。

现在的问题是为什么不能开机启动通过。
发表于 2009-12-11 02:44:00 | 显示全部楼层
你要加到init.d里的哪个级别,一般是40
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表