0

I have these config: Host with putty -- > Gateway A (port 22 open) --> FinalMachine (port 22 with gateway A open and port 18080 with apache).

Like I don't have communication from Host with putty with FinalMachine I would like to tunneling the connection to can connect directly from Host to 18080 of FinalMachine.

I'm trying to do with putty but I can't find the solution. Anyone could help me please? Thanks!

1 Answers1

0

Method 1, using 2 instances of putty

  • Putty 1: Local forward 20022:GatewayB:22, Connect to GatewayA
  • Putty 2: Local forward 18080:FinalMachine:18080, Connect to localhost:20022

Method 2:

  • Putty Local forward 18080:127.0.0.1:18080,
    • From within session do next step ssh -L 18080:FinalMachine:18080 GatewayB
NiKiZe
  • 1,246
  • 8
  • 20
  • Sorry the Method 1 I can't understand. What is GatewayB??? Thanks – user650034 Aug 16 '21 at 16:41
  • Problem is mine in the question redaction GatewayB is FinalMachine. I've edited the main question – user650034 Aug 16 '21 at 16:41
  • Since you used "multi hops" and mentioned Gateway B I assumed there actually was a B machine. As long as `Gateway A` can access `FinalMachine:18080` you only need that one forward when connecting to `A`. On the other hand if `18080` is only accessible from `FinalMachine` itself, then use above, replace `B` with `Final` and possible change to localhost. – NiKiZe Aug 16 '21 at 17:28