iptable共享上网问题,紧急求助!
时间:2005-05-05
来源:互联网
脚步如下:
iptables -P INPUT DROP
iptables -A INPUT -i ! ppp0 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp -i ppp0 --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -i ppp0 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p udp -i ppp0 -j REJECT --reject-with icmp-port-unreachable
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
前面都是好的,但执行最后一行时报错:
iptables: Invalid argument,我把最后一行拿出来分段执行,有如下报错:
iptables v1.2.9: Unkown arg '-j'
可是我记得以前用这种方法是可以共享上网的啊,兄弟们请帮帮我啊! 谢谢了!
我的系统是mandrake 10.0 official
iptables -P INPUT DROP
iptables -A INPUT -i ! ppp0 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp -i ppp0 --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -i ppp0 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p udp -i ppp0 -j REJECT --reject-with icmp-port-unreachable
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
前面都是好的,但执行最后一行时报错:
iptables: Invalid argument,我把最后一行拿出来分段执行,有如下报错:
iptables v1.2.9: Unkown arg '-j'
可是我记得以前用这种方法是可以共享上网的啊,兄弟们请帮帮我啊! 谢谢了!
我的系统是mandrake 10.0 official
作者: florist 发布时间: 2005-05-05
刚才在netfilter官方网站找到了:
You have just upgraded your kernel and suddenly some of the commands (especially in the 'nat' table), and you experience something like:
# iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE
iptables: Invalid argument
This happens when the structure size between kernel and userspace changes. You will need to recompile the iptables userspace program using the include files of your new kernel. This only happens if you (or the vendor of your kernel) has applied some patches either only to the old or only to the new kernel. It is not supposed to happen between vanilla kernel.org kernels. If it does, please inform the netfilter-devel mailinglist.
问题是我新装的系统,还没有作任何更新啊,难道就没有别的兄弟碰到这个问题?
现在决定更新一下系统试试!
You have just upgraded your kernel and suddenly some of the commands (especially in the 'nat' table), and you experience something like:
# iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE
iptables: Invalid argument
This happens when the structure size between kernel and userspace changes. You will need to recompile the iptables userspace program using the include files of your new kernel. This only happens if you (or the vendor of your kernel) has applied some patches either only to the old or only to the new kernel. It is not supposed to happen between vanilla kernel.org kernels. If it does, please inform the netfilter-devel mailinglist.
问题是我新装的系统,还没有作任何更新啊,难道就没有别的兄弟碰到这个问题?
现在决定更新一下系统试试!
作者: florist 发布时间: 2005-05-05
那你就重装一下iptables就是啦(有这个包吧?),不过没道理,既然是用rpm包安装的吗,不应该关编译的事啊。你自己编译的内核?
作者: nwslustc 发布时间: 2005-05-05
引用:
作者: florist
刚才在netfilter官方网站找到了:
You have just upgraded your kernel and suddenly some of the commands (especially in the 'nat' table), and you experience something like: # iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE iptables: Invalid argument This happens when the structure size between kernel and userspace changes. You will need to recompile the iptables userspace program using the include files of your new kernel. This only happens if you (or the vendor of your kernel) has applied some patches either only to the old or only to the new kernel. It is not supposed to happen between vanilla kernel.org kernels. If it does, please inform the netfilter-devel mailinglist. 问题是我新装的系统,还没有作任何更新啊,难道就没有别的兄弟碰到这个问题? 现在决定更新一下系统试试! |
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
作者: mummy 发布时间: 2005-05-11
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28