سؤال

I have a doubt about the following system architecture:

Lets say we have three machines:

SERVER A
SERVER B
EXTERNAL A

SERVER A is offering some streaming services and its behind an uknown network, so it opens a reverse SSH tunnel to SERVER B on an specified PORT, so SERVER B can access to SERVER A service by http: //localhost:PORT

SERVER B is running linux and openssh server for accepting the tunnel. (this server is public)

The doubt comes when I want to access the streaming service offered by SERVER A from EXTERNAL A via the public SERVER B. Suposing I know the PORT I'd like to achieve something like:

EXTERNAL A -> 'http: //serverB_IP:PORT' -> SERVERB -> 'http ://localhost/PORT' -> Tunnel -> SERVER A service.

To entangle it even more there could be plenty SERVER A servers which opens a Tunnel with SERVER B (each one on a different port correctly managed).

Any idea about how to achieve that?

هل كانت مفيدة؟

المحلول

if you enable

GatewayPorts yes                                                      

in your sshd_config on server b then it is possible to connect from the outside to server b and make use of the established tunnel to server a. by default GatewayPorts is disabled and the tunnel will only work locally.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top