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 1HKNVh-00054Q-0N for garchives@archives.gentoo.org; Thu, 22 Feb 2007 23:38:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l1MNZRhB023628; Thu, 22 Feb 2007 23:35:27 GMT Received: from mail (c-24-245-14-14.hsd1.mn.comcast.net [24.245.14.14]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l1MNRUvr013653 for ; Thu, 22 Feb 2007 23:27:30 GMT Received: from pascal.spore.ath.cx (pascal.spore.ath.cx [192.168.1.100]) by mail (Postfix) with ESMTP id 99DFB6D0D for ; Thu, 22 Feb 2007 17:27:29 -0600 (CST) Date: Thu, 22 Feb 2007 17:27:29 -0600 From: Dan Farrell To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Routing: how to enable.. Message-ID: <20070222172729.355f1cfb@pascal.spore.ath.cx> In-Reply-To: <200702172122.19163.surely@life.de> References: <200702172122.19163.surely@life.de> Organization: Spore, Ltd. X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.10.6; x86_64-pc-linux-gnu) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: fe4b1306-94ce-4484-ba7a-5416263a5a36 X-Archives-Hash: e3509927e18872b11abb2682cf272a9a On Sat, 17 Feb 2007 21:22:16 +0100 Roman Naumann wrote: > Hi, please forgive this most probably very simple question, but I > cannot find the correct configuration file to enable routing... > > I have two PCs, one HAS a internet connection to the internet-proxy, > the other one hasn't. > The internet-pc (and I do not mean the proxy-pc) has two ethernet > devices, ra0 and eth0. > > eth0 connects it with the non-internet pc. > > I set up a route to the internet-proxy-px on the internet-pc and it > works fine on it, but the the non-internet pc can't use it! > > Even though the non-internet pc has it's default gw set to the eth0 > ip of the internet pc. > > Thanks for your help. "Michal 'vorner' Vaner" was basically correct. PC2 is now a router, and in its tasks are included not only forwarding packets from PC3 to the outside world, but also forwarding them back to PC3. In the routing table PC2 will need routes to PC3 through eth0, and the same default it has now. Without the right routes, PC2 will try to respond to PC3 through ra0, the default route (I assume). Here is an annotated routing table from a router of mine. >zeus ~ # route >Kernel IP routing table >Destination Gateway Genmask Flags Metric Ref Use >Iface >192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 you can see there the route to the subnet it's plugged into, doesn't need to go through the default rout below. >192.168.10.0 * 255.255.255.0 U 0 0 0 eth0 there's the subnet it forwards for, you'll notice it's different. In my case. There must of course be some way to distinguish between them for routing purposes, but you could also route to a host specifically. >loopback * 255.0.0.0 U 0 0 0 lo >default davey.spore.ath 0.0.0.0 UG 0 0 0 eth1 theres where all other traffic goes, through my internet firewall. However the same is true of the default router davey from the lastline above. >davey ~ # route >Kernel IP routing table >Destination Gateway Genmask Flags Metric Ref Use Iface >192.168.2.0 * 255.255.255.0 U 0 0 0 ath0 it routes to a wireless network just like PC1/PC2 in your configuration. >192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 and same as before, for route to the subnet it's plugged into. >c-24-245-14-0.h * 255.255.255.0 U 0 0 0 eth1 for comcast, my cable company's subnet im plugged into >192.168.10.0 zeus.spore.ath. 255.255.255.0 UG 0 0 0 eth0 for the subnet above, this is what im talking about. >loopback * 255.0.0.0 U 0 0 0 lo yep >default c-3-0-ubr02.eag 0.0.0.0 UG 0 0 0 eth1 and by default, out the cable modem on eth1. this last part is probably the problem Roman Naumann has or had. Don't forget you must enable ip forwarding if you desire to use it: >zeus ~ # cat /proc/sys/net/ipv4/ip_forward >1 here you can see that ip_forward is set to 1 to indicate that i wish to enable forwarding for other computers. To set it as such, command the computer thusly. >zeus ~ # echo 1 > /proc/sys/net/ipv4/ip_forward -- gentoo-user@gentoo.org mailing list