I had a similar situation, and your advice worked.
I’d like to leave a note here for others who might run into this issue.
The setup:
laptop -> target1 -> target2 -> target3
There is a service running on target3
that is only accessible on target3
via port 8888
. I want to expose that service on my laptop.
As you mentioned, we need to create 3 tunnels:
Tunnel A: localhost:9999 -> target1:22
Tunnel B: localhost:9998 -(localhost:9999)-> target2:22
Tunnel C: localhost:8888 -(localhost:9998)-> target3:8888
With these tunnels in place, navigating to localhost:8888
on my laptop should send data to target3:8888
via target2
and target1
.
Here are the details you need to set up the tunnels in the SSH Tunnel app:
Tunnel A
SSH Host: target1:22
Port Forwarding: -D 9999
Tunnel B
SSH Host: target2:22
Port Forwarding: -D 9998
Connect through a proxy: Yes
Proxy Type: SOCKS5
Server: localhost:9999
Tunnel C
SSH Host: target3:22
Port Forwarding: -L 8888:localhost:8888
Connect through a proxy: Yes
Proxy Type: SOCKS5
Server: localhost:9998