设置IP转发提示iptables: No chain/target/match by that name错误的解决方法

来源:互联网 发布:淘宝排名查询网站 编辑:程序博客网 时间:2024/06/17 03:09

iptables的的指令可以用,但是当我要加入规则时,却出现以下的错误讯息。

[root@vpnserver ~]# /sbin/iptables -I FORWARD -d 0.0.0.0/0 -p tcp --dport 443 -m string --string "chinabank.com.cn" --algo bm -j REJECTiptables: No chain/target/match by that name.[root@vpnserver ~]# 

谷歌了一下,有反应说是因为没有iptables的的模块,
一开始觉得怎么可能,因为都可以使用指令了,为什么会没有包含此模块,

结果lsmod的看了一下,还真的没有。


[root@vpnserver ~]# lsmodModule                  Size  Used by

试着做以下指令,结果还真的没有此模块,
[root@vpnserver ~]# modprobe iptablesFATAL: Module iptables not found.[root@vpnserver ~]# 
既然这样,只好重新编译内核了。



0 0
原创粉丝点击