2

I have the following situation: DevMachine (D) need to connect to a gateway/bastion server (G) and then be able to talk to another server serving RabbitMQ (R) traffic on port 5672.

I tried using an ssh tunnel to the gateway: ssh -L 5672:localhost:5672 G and next I want the gateway instance to let me connect to R's 5672. How do I accomplish that? I feel like I am missing a step here.

What I want: D ->G -> R. What I am getting is D ->G. If I had a rabbitmq instance running locally on G - this works but what I want is to essentially use G as a VPN.

Thanks!

Urjit
  • 163
  • 1
  • 5

1 Answers1

5

If you want to connect to remote host, you need to use its name, not the localhost:

ssh -L 5672:R:5672 G

in this way, you should be able to access host R on localhost:5672.

Jakuje
  • 9,715
  • 2
  • 42
  • 45
  • I think thats the right answer for my question - I have other VPN issues that I need to fix. Thanks! @Jakuje – Urjit Jul 25 '16 at 20:57