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 ) id 1HnFhS-0000OC-Rv for garchives@archives.gentoo.org; Sun, 13 May 2007 15:09:31 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l4DF8HfK000576; Sun, 13 May 2007 15:08:17 GMT Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l4DF3u81028267 for ; Sun, 13 May 2007 15:03:57 GMT Received: by wx-out-0506.google.com with SMTP id i30so2355118wxd for ; Sun, 13 May 2007 08:03:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:disposition-notification-to:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=aA1VsxaIIc2PNKFUJH5kBdlDJRpmAY5prJZZXepdamPwJaNVnnEHiKLqW0Kdy6n1IxCGw8YuJGh6L9XI9of+0cz7K3x8LolJA3NsbBr40bhylSU5aqXbr3PMjs09ekc8hV+qRDPir2Rc0S09s/QGo8QiLaNKY+NJisjZCTSc6Hc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:disposition-notification-to:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=dGLZBrmoY9nLyCMBwfcglyr+sOkKtip1SC7n5PjHZJs4GEqd75ahx451h9GwWHN9RZuk7I2cG92qee/6mL0qGXskhG4/RrXDR2pT2krSePjAvE6PyFRdTj0yuCVo3AeF+MJDefOQqCS7ezSo2+AwS78ZlcW3vtu+YR6u6ioKoHg= Received: by 10.70.100.14 with SMTP id x14mr8275029wxb.1179068636073; Sun, 13 May 2007 08:03:56 -0700 (PDT) Received: from ?192.168.10.101? ( [190.24.106.12]) by mx.google.com with ESMTP id q34sm10258832wrq.2007.05.13.08.03.53; Sun, 13 May 2007 08:03:54 -0700 (PDT) Message-ID: <464728CF.9070809@gmail.com> Date: Sun, 13 May 2007 10:03:43 -0500 From: Fabio A Correa Organization: Universidad Nacional User-Agent: Thunderbird 2.0.0.0 (X11/20070429) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] iptables configuration problem References: <7797aa370705130741m381555b2qf64fc3a96c271769@mail.gmail.com> In-Reply-To: <7797aa370705130741m381555b2qf64fc3a96c271769@mail.gmail.com> X-Enigmail-Version: 0.95.0 OpenPGP: url=http://facorread.150m.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 5afb11cb-51fa-4382-84b4-9984390acb0d X-Archives-Hash: 61b49e0c9f772c6e870ceee414e4e8f3 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Wu, Instead of the commands you posted, you should use echo 1 > /proc/sys/net/ipv4/ip_forward iptables --table nat -A POSTROUTING -s 192.168.8.0/24 -j MASQUERADE Long explanation: The first command enables the kernel to _forward_ packets from eth0 to eth1 and vice versa. To do the actual forwarding, the second command is used: - --table nat : Network address translation table. - -A POSTROUTING for altering packets as they are about to go out, after it is determined that they are to be forwarded by means of the first instruction. - -j MASQUERADE Masquerade the addresses of computer in the subnet with the address of the routing computer. The kernel takes care of the subtle details on masquerading. I hope this helps!!! - -- Fabio A. Correa D. Physics Dept, Universidad Nacional, Bogota, Colombia facorread@gmail.com ffaaccdd@yahoo.co.uk facorread@unal.edu.co My webpage and OpenPGP key at http://facorread.150m.com facorread@alexandria.cc is not working anymore!!! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGRyjPYOZCB4zf2uQRAp2eAJwIYrXAQqldgZjRN0u+uDOW8t/aTgCeOQOb RTmVGHOHQQWUzVxkZomHhHo= =xvIZ -----END PGP SIGNATURE----- -- gentoo-user@gentoo.org mailing list