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 1H5fko-0006gY-QR for garchives@archives.gentoo.org; Sat, 13 Jan 2007 10:04:51 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id l0DA2rxE015575; Sat, 13 Jan 2007 10:02:53 GMT Received: from ilievnet.com ([84.21.204.200]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id l0D9vsp8006096 for ; Sat, 13 Jan 2007 09:57:56 GMT Received: from localhost (localhost [127.0.0.1]) by ilievnet.com (Postfix) with ESMTP id 0C2F7214821 for ; Sat, 13 Jan 2007 11:57:51 +0200 (EET) X-Virus-Scanned: amavisd-new at ilievnet.com Received: from ilievnet.com ([127.0.0.1]) by localhost (ilievnet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vF-sf-NQzyAg for ; Sat, 13 Jan 2007 11:57:25 +0200 (EET) Received: from [10.0.1.1] (mail.ilievnet.com [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ilievnet.com (Postfix) with ESMTP id 99EEE210022 for ; Sat, 13 Jan 2007 11:57:09 +0200 (EET) Message-ID: <45A8ACEE.3070107@ilievnet.com> Date: Sat, 13 Jan 2007 11:57:02 +0200 From: Daniel Iliev User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.0.9) Gecko/20070111 MultiZilla/1.8.3.0a SeaMonkey/1.0.7 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] Need help networking two machines. References: <45A75E6C.7070802@exceedtech.net> <45A76F4F.7050306@ilievnet.com> <45A7CE87.7050301@exceedtech.net> <45A7D1F2.6050201@gmail.com> <45A8A0E5.8080407@exceedtech.net> In-Reply-To: <45A8A0E5.8080407@exceedtech.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 809e350f-8a22-4774-8bdd-70df5185a196 X-Archives-Hash: 5793abb8ababee0633622645076e894b Dale wrote: > I ran those commands and it now works fine. I can ssh and everything. > When I run /etc/init.d/iptables save, where does it save those too? I > want to save the rules I had, just in case. I thought it was in /var > somewhere but I can't find it. > > - It is defined in "/etc/conf.d/iptables" as variable named IPTABLES_SAVE. > I need to learn iptables I guess. It looks like those commands open > everything up. I also don't know if it will connect the second rig to > the net through my main box. Something I'll have to test out later. > No, it would not connect the second rig to The Internet if you use reserved IP addresses (eg. 10.X.X.X or 192.168.X.X). In that case you have to enable ip forwarding and network address translation (NAT) on the rig which is connected to The Internet. May be it is a good start to read the "Home Router Guide" [1]. The following quick & dirty guide should be suffucient: 1) put "net.ipv4.ip_forward = 1" in "/etc/sysctl.conf" 2) sysctl -p 3) iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE (replace "ethX" with the name of the interface connected to The Internet) 4) /etc/init.d/iptables save 5) rc-update -a iptables default Please, read the guide [1] provided by Gentoo. The solution I'm showing here is really dirty because it doesn't provide any security. [1] http://www.gentoo.org/doc/en/home-router-howto.xml -- Best regards, Daniel -- gentoo-user@gentoo.org mailing list