From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.62)
	(envelope-from <gentoo-user+bounces-63900-garchives=archives.gentoo.org@gentoo.org>)
	id 1HnYle-0001dQ-5O
	for garchives@archives.gentoo.org; Mon, 14 May 2007 11:31:06 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l4EBToXs025990;
	Mon, 14 May 2007 11:29:50 GMT
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247])
	by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l4EBNoO6017749
	for <gentoo-user@lists.gentoo.org>; Mon, 14 May 2007 11:23:51 GMT
Received: by an-out-0708.google.com with SMTP id b33so464260ana
        for <gentoo-user@lists.gentoo.org>; Mon, 14 May 2007 04:23:50 -0700 (PDT)
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;
        d=gmail.com; s=beta;
        h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=eN1OszkCoJBo6Q4xlmET3xsiwxEQzl2Yt1liuQU5ZYYcIpLkatChB7enzQT+KSYnidYYx6huc/JtMSVZsqWORJx2aE6PXKNijaGrijktDbYdgTb67Xm3o0Z5nOyZSo7aE48EpOPsSbVRXOV/f//sVEmEnRzDXA22N+oCw3SSuVA=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=Q5A4pOl+KZjU6JW6UaKx0G20LqqqFJ+xp4m22YwFchx6PIwFq+4fd4KTVEh3NINOQTOpfTL1eLVErVhMFtsY5cFpVyxPrHXfYP2mdXqFbw8qVuVHKwebgoq6VGDA6GIj8/E8RZxbNX8O2obDfnmXke/gnTOdwHJNgVlynah7jhs=
Received: by 10.100.210.10 with SMTP id i10mr4343158ang.1179141829741;
        Mon, 14 May 2007 04:23:49 -0700 (PDT)
Received: by 10.100.174.17 with HTTP; Mon, 14 May 2007 04:23:49 -0700 (PDT)
Message-ID: <7797aa370705140423p2f320d5akfc18fc71e0f10a52@mail.gmail.com>
Date: Mon, 14 May 2007 19:23:49 +0800
From: "Chuanwen Wu" <wcw8410@gmail.com>
To: gentoo-user <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] iptables configuration problem
In-Reply-To: <200705140748.34409.nbensa@gmx.net>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <7797aa370705130741m381555b2qf64fc3a96c271769@mail.gmail.com>
	 <200705140056.33985.nbensa@gmx.net>
	 <7797aa370705140218s1ee9b7b4yea52a7140b031b05@mail.gmail.com>
	 <200705140748.34409.nbensa@gmx.net>
X-Archives-Salt: d262e4e6-4728-41e2-8cb7-579c7949e9ff
X-Archives-Hash: 8645cc9ea97d0a229070d342da98f7d6

2007/5/14, Norberto Bensa <nbensa@gmx.net>:
> 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
-- 
gentoo-user@gentoo.org mailing list