On Sat, 17 Feb 2007 21:22:16 +0100
Roman Naumann <[EMAIL PROTECTED]> 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

Reply via email to