2007/5/14, Norberto Bensa <[EMAIL PROTECTED]>:
Chuanwen Wu wrote:
> I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1.
> Is't all right?

I don't know, it depends on what's your gw's IP is.

Let's say you have this setup:


GW: 192.168.1.1

Other PCs are: 192.168.1.2... 192.168.1.3... and so on.


On the GW you need:

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

iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
(note: change ethX by the NIC your internet connection is on. If your
cablemodem/adsl/whatever is on eth3 -for example- change ethX to eth3)


On the others PC you need to set GW to 192.168.1.1


I hope this helps.

Best regards,
Norberto

Thank you!I think i have done what you meant.
Here is the information:

/etc/conf.d/net in the server
config_eth0=( "202.114.10.134 netmask 255.255.255.0 brd 202.114.10.255" )
routes_eth0=( "default gw 202.114.10.129" )

config_eth1=( "192.168.1.63 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth1=( "default gw 192.168.1.1" )


/etc/conf.d/net in one PC
config_eth0=( "192.168.1.35 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default gw 192.168.1.1" )

--
wcw
--
[EMAIL PROTECTED] mailing list

Reply via email to