请教双网卡共享上网问题

由 devils 在 08-08-2002 02:25 发表:

请教双网卡共享上网问题

eth0 192.168.0.1

eth1 动态IP上网

客户机用DHCP取得IP地址,以下是dhcpd.conf配置

subnet 192.168.0.0 netmask 255.255.255.0 {

range 192.168.0.2 192.168.0.24;

default-lease-time 259200;

max-lease-time 777600;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.0.255;

option routers 192.168.0.1;

option domain-name-servers 210.77.127.65, 210.77.127.66;

}

客户可以PING通主机,之后执行

#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

#echo 1 > /proc/sys/net/ipv4/ip_forward

但客户机还是不上网。

请问我应该怎样设置iptables才能共享上网?


由 xchen 在 08-08-2002 08:42 发表:

**试一下: < **

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