3

I am trying to forward port from A:1234 to B:5678. Now, C will connect to A:1234 and will get forwarded to B:5678.

I could get this to work using PuTTY using this configuration: PuTTY Tunnels Configuration screenshot

Now, I am trying to do the same using plink. Unfortunately, I don't know what option should I use with plink that would be equivalent to "Local ports accept connections from other hosts" in the screenshot. The command I tried is

plink -i dummy.ppk -L *:5678:localhost:1234 account@12.34.56.78

What would be the plink equivalent of the above screenshot?

1 Answers1

4

Got the solution. By changing from

plink -i dummy.ppk -L *:5678:localhost:1234 account@12.34.56.78

to

plink -i dummy.ppk -L 0.0.0.0:5678:localhost:1234 account@12.34.56.78

it is working as expected.

The difference was this: With the first command, Sysinternals TCPView showed plink.exe opening a connection with local address as 127.0.0.1. With the second command, the local address became 0.0.0.0. I guess this tells plink to accept connections from other hosts.