(E-Mail Removed) wrote:
>Hello,
>
>I hope this is a suitable place to post such a question and that the
>explanation here makes sense.
>
>I have an app on server A in London that opens a local port and
>connects to a port on a remote machine. Fairly simple.
>
>There is a server B in Milan that is on a network where a second
>application resides that we want to connect our app to. This server
>has an external interface for us to connect to and an internal
>(192.168.x.y) interface on its LAN. I have set a static route so that
>it can reach a 10.x.y.z address on another LAN (there is some NAT-fu
>going on through the gateway 192.168.0.1, I'm not sure).
>
>So
>
>Server A ------ firewall ----- Server B ------ 10.128.242.63
>London Milan
> [ Milan network ]
>
>The app can't run on Server B and the Italians will only allow access
>via Server B.
>
>Is this a ridiculous scenario first of all?! If not any ideas?
>
>I thought about setting an SSH tunnel but AFAIK there then has to be
>some
>port at Server B that I can forward local (at Server A) requests to
>which there won't be if the app isn't running there. I guess I need
>some connection open to the 10.x address at the end of the chain for
>this to work?
>
>Should I start thinking about a more hi-tech solution and using our
>Cisco PIX to open a "VPN" to the box in Milan?
>
>Ian
>
>
>
Hi Ian,
If I understand correctly, you want to connect from Server_A to the
port P of the machine 10.128.242.63, right ? I also assume that there is
an SSH server running on Server_B. Then you should run this on Server_A:
ssh -L <port_A>:10.128.242.63:<port_P> -N user_name@Server_B
where <port_A> is whatever port you want, but above 1024. Then, any
connection from Server_A to localhost:<port_A> is equivalent to a
connection from Server_A to 10.128.242.63:<port_P>.
On Server_B you don't need any port open, except for SSH.
Mihai