Re: [gentoo-user] Routing: how to enable..

2007-02-22 Thread Dan Farrell
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 GatewayGenmask Flags Metric RefUse
Iface
192.168.1.0 *  255.255.255.0   U 0  00 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  00 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  00 lo
default davey.spore.ath 0.0.0.0UG0  00 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
DestinationGateway 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.0zeus.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.0UG 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



[gentoo-user] Routing: how to enable..

2007-02-17 Thread Roman Naumann
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.


pgpnur5LkkA55.pgp
Description: PGP signature


Re: [gentoo-user] Routing: how to enable..

2007-02-17 Thread JT Justman
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.

Roman,

I'm not quite clear on your configuration. What sort of device is the
internet-proxy? Is it a NAT router, or something else? Are all three
devices in the same subnet? It sounds like you're either trying to work
around not having a hub, or not having a NAT device.

JT

-- 
Web:http://www.signless.com
E-Mail: [EMAIL PROTECTED]
Voice:  (503) 616-4816
Cell:   (503) 419-8806
Skype:  jt.justman
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Routing: how to enable..

2007-02-17 Thread sunnavy
You need something like NAT to be configured on your internet-pc.
This maybe help(especially the NAT part): 
http://www.gentoo.org/doc/en/home-router-howto.xml

Best wishes, ;-)
On 21:22 Sat 17 Feb , 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.




pgpurr3L2cPld.pgp
Description: PGP signature


Re: [gentoo-user] Routing: how to enable..

2007-02-17 Thread Roman Naumann
 Roman,

 I'm not quite clear on your configuration. What sort of device is the
 internet-proxy? Is it a NAT router, or something else? Are all three
 devices in the same subnet? It sounds like you're either trying to work
 around not having a hub, or not having a NAT device.

Thanks for your answer.

Here the whole configuration: (imagine it as a complicated line of different 
connections through the entire house...)

PC1 (the proxy-running-pc) is running windows and a proxy software for the 
internals of my skydsl connection.

[PC1 and Router1 are connected via wired-lan]

Router1 is acting as a wlan-lan bridge (but without any direct internet 
functions..).

[Router1 and PC2 are connected via wireless-lan]

PC2 (the internet-pc) is running gentoo and has a wireless and a wired-lan 
connection.

[PC2 and PC3 are connected via wired-lan]

PC3 (the non-internet-pc) is running genoo and only has a wired-lan 
connection.

All I need is (ping like) access to PC1 to use the internet connection. 
(Usually adding the http_proxy environment variable or something to PC1's 
IP-address.)

PC2 has Router1 set as the default gateway and can ping PC1 hence.

PC3 has set PC2 as the default gateway, but cannot ping anything else than 
PC2. (...which is directly connected anyway...)

I think NAT isn't what I'm looking for, I just need ping access to _one_ 
specific ip, so, some static routes should do the job.

I hope that clarifies my situation.

Thanks for your help so far.



pgpsHaSFKYUCS.pgp
Description: PGP signature


Re: [gentoo-user] Routing: how to enable..

2007-02-17 Thread Michal 'vorner' Vaner
Hello,

On Sat, Feb 17, 2007 at 11:07:34PM +0100, Roman Naumann wrote:
 Here the whole configuration: (imagine it as a complicated line of different 
 connections through the entire house...)
 [SNIP]

Hm, I think in theory you should have the PC in the middle with 2 IP
addresses, on each interface different. On each segment (each side of
the middle one) should be IPs from different range and there should be
allowed routing (that I do not know how). It would look like this:

--( PC1 IP-A/Range1 ) -- ( IP-B/Range1 PC2 IP-C/Range2 ) -- ( 
IP-D/Range2 PC3 )

PC2 can comm with all (since it is on both nets). PC3 shloud use IP-C as
its gateway, which will allow it to access PC1. PC1 should have static
route for whole Range2 to IP-B, so it can send to PC3. Now, how is that
set in Windows, who knows..

After this all is set, PC1 and PC3 should be able to talk to each other.
However, you will not see the pings unless both directions work.

So, you need to:
• PC3: /etc/conf.d/net:routes_eth0 = { default via IP-C }
• PC2: enable routing (I guess /etc/conf.d/net too)
• PC1: add a static route Range2 - IP-B.

I just hope I did not mess that up.

Or you can set up a bridge on PC2 to make both segments one net only:
http://gentoo-wiki.com/HOWTO_setup_a_gentoo_bridge

Have a nice day

-- 
BOFH Excuse #452:

Somebody ran the operating system through a spelling checker.

Michal 'vorner' Vaner


pgpsG8TMWnIAY.pgp
Description: PGP signature


Re: [gentoo-user] Routing: how to enable..

2007-02-17 Thread JT Justman
Michal 'vorner' Vaner wrote:
 Hello,
 
 On Sat, Feb 17, 2007 at 11:07:34PM +0100, Roman Naumann wrote:
 Here the whole configuration: (imagine it as a complicated line of different 
 connections through the entire house...)
 [SNIP]
 
 Hm, I think in theory you should have the PC in the middle with 2 IP
 addresses, on each interface different. On each segment (each side of
 the middle one) should be IPs from different range and there should be
 allowed routing (that I do not know how). It would look like this:
 
 --( PC1 IP-A/Range1 ) -- ( IP-B/Range1 PC2 IP-C/Range2 ) -- ( 
 IP-D/Range2 PC3 )
 
 PC2 can comm with all (since it is on both nets). PC3 shloud use IP-C as
 its gateway, which will allow it to access PC1. PC1 should have static
 route for whole Range2 to IP-B, so it can send to PC3. Now, how is that
 set in Windows, who knows..
 
 After this all is set, PC1 and PC3 should be able to talk to each other.
 However, you will not see the pings unless both directions work.
 
...snip...

Yeah, this sounds pretty good to me. The subnet assignments are key, as
is confirming connectivity at each point. Bridging on PC2 is a good
choice too. Not sure if your WiFi router is really in bridge mode or
not. Be sure its 'WAN' side is in Range1 and its 'LAN' side is in Range2.

JT

-- 
Web:http://www.signless.com
E-Mail: [EMAIL PROTECTED]
Voice:  (503) 616-4816
Cell:   (503) 419-8806
Skype:  jt.justman
-- 
gentoo-user@gentoo.org mailing list