樱家冢 发表于 2003-3-16 12:04:18

555,我的网关还是没搞定!

发现没有/etc/sysconfig/iptables文件,用gugong兄的样例改了一下,放了一个过去,然后/etc/rc.d/init.d/network restart,没有用,还有报错信息,现在我不在那台机器上,没办法帖过来,反正就是说语法错误,目标不存在,然后要我iptables --help自己好好看。
运行mct,把防火墙设置里面设为全部允许,保存,观察了一下,是和iptables有关,正在关闭iptables、应用新规则、启动iptables……
我已经按照提示在 /etc/sysctl.conf 文件里面修改了 net.ipv4.ip_forward = 1 ,可是,重启机器,还是不行,555,谁来帮帮我。

mct修改的iptables的配置文件到底是什么?

llc 发表于 2003-3-16 12:11:32

# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*mangle
:PREROUTING ACCEPT
:INPUT ACCEPT
:FORWARD ACCEPT
:OUTPUT ACCEPT
:POSTROUTING ACCEPT
COMMIT
# Completed on Tue Oct 29 22:28:14 2002
# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*nat
:PREROUTING ACCEPT
:POSTROUTING ACCEPT
:OUTPUT ACCEPT
-A POSTROUTING -o eth0 -j MASQUERADE         <---eth0是对外的网卡
COMMIT
# Completed on Tue Oct 29 22:28:14 2002
# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*filter
:INPUT ACCEPT
:FORWARD ACCEPT
:OUTPUT ACCEPT
COMMIT
# Completed on Tue Oct 29 22:28:14 2002

我的iptables内容

樱家冢 发表于 2003-3-16 13:12:44

# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*mangle
:PREROUTING ACCEPT
:INPUT ACCEPT
:FORWARD ACCEPT
:OUTPUT ACCEPT
:POSTROUTING ACCEPT
COMMIT
# Completed on Tue Oct 29 22:28:14 2002
# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*nat
:PREROUTING ACCEPT
:POSTROUTING ACCEPT
:OUTPUT ACCEPT
-A POSTROUTING -o eth0 -j MASQUERADE         <---eth0是对外的网卡
COMMIT
# Completed on Tue Oct 29 22:28:14 2002
# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002
*filter
:INPUT ACCEPT
:FORWARD ACCEPT
:OUTPUT ACCEPT
COMMIT
# Completed on Tue Oct 29 22:28:14 2002

我的iptables内容

为什么gugong的帖子里面那些都是ACCEPT?

llc 发表于 2003-3-16 17:19:36

我这个也是抄的,不清楚怎么写,反正copy过来也可以用

樱家冢 发表于 2003-3-16 18:42:47

不求甚解的典型啊,呵呵,不好意思,其实我比不求甚解更糟糕。

jackey 发表于 2003-3-16 22:55:24

Accept 和不是都是一样的!

KanKer 发表于 2003-3-16 23:09:01

如果是用adsl虚拟拨号上网,若不设网关,则默认为ppp0。
页: [1]
查看完整版本: 555,我的网关还是没搞定!