局域网的电脑不能上网!

由 wuhu 在 11-22-2003 09:53 发表:

局域网的电脑不能上网!

个位大哥这个问题让我郁闷了很久了,精华帖看了好几遍了 ,但是就是不知道什么地方错了哦!

简单说一下我的上网方式,

服务器rh9,有2个网卡

接外网:eth0

分配的ip:192.168.0.44,DNS:211.98.2.4,gw:192.168.0.1(铁通)

局域网:eth1

ip:172.168.0.1

局域网的其他的电脑都是winxp,他们的gw都是172.168.0.1

ip随便写的,

我的 /etc/rc.d/rc.local内容

> > 源码: >
> * * * >
>
> > > touch /var/lock/subsys/local
> > > echo 1 > /proc/sys/net/ipv4/ip_forward
> > > modprobe iptable_nat
> > > modprobe ip_conntrack
> > > modprobe ip_conntrack_ftp
> > >
> > > iptables -F INPUT
> > > iptables -F FORWARD
> > > iptables -F POSTROUTING -t nat
> > > iptables -t nat -F
> > > iptables -P FORWARD DROP
> > > iptables -A FORWARD -s 172.168.0.0/24 -j ACCEPT
> > > iptables -A FORWARD -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
> > > iptables -t nat -A POSTROUTING -o eth0 -s 172.168.0.0/24 -j MASQUERADE
> > >
>
> * * *

<font face="腩戾,verdana, ari

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus