Routing question

Bob Edwards Robert.Edwards at anu.edu.au
Mon Sep 9 15:22:58 EST 2002


Michael Still wrote:
> 
> Hey,
> 
> I have a network config which looks like:
> 
>   (Network x.y.z.*)
>          |
>   ----------------
>   |    x.y.z.6   |   Client end
>   ----------------
>          |
>          | (ppp over ssh vpn)
>          |
>   ----------------
>   |    a.b.c.d   |   Server end
>   ----------------
>          |
>   (Network 172.31.0.*)
> 
> So, the box x.y.z.6 connects to a.b.c.d with ssh, and then tunnels ppp
> through it. This has worked fine for some time. For instance, I can telnet
> to 172.31.0.201 from x.y.z.6, and it just works.
> 
> Now, I want to be able to get to random hosts in x.y.z.* from the
> 172.31.0.* network.
> 
> To my understanding, I can't just go
>   route add -net x.y.z.0 netmask 255.255.255.0 dev ppp0
> 
> Because this means that ssh can no longer talk to x.y.z.6 to get the
> traffic across.
> 
> My host specific routes don't seem to work. Can I have a hint please?
> 
> Thanks,
> Mikal

Can you already get to random hosts on x.y.z.* from a.b.c.d? If not, you need
a route like:

 route add -net x.y.z.0 netmask 255.255.255.0 gw
IP_ADDR_OF_PPP_LINK_ON_x.y.z.6

Then you need to turn on forwarding (on both ends of the PPP link).

Each host on 172.31.0.* which isn't a.b.c.d. needs to have a routing entry
(maybe a default route?) for x.y.z.* traffic through a.b.c.d as the gateway.

Cheers,

Bob Edwards.



More information about the linux mailing list