[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] iptables configuration problem
From:       Norberto Bensa <nbensa () gmx ! net>
Date:       2007-05-14 10:48:34
Message-ID: 200705140748.34409.nbensa () gmx ! net
[Download RAW message or body]

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
-- 
gentoo-user@gentoo.org mailing list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic