7

I'm connecting from one Windows machine to another using RDP. I'd like to forward traffic headed for localhost:81 to a machine accessible to the remote machine via its internal network on a local IP address, let's say 10.90.228.163. So I want the TCP traffic to go:

client --> localhost:81 --> [rdphost] --> 10.90.228.163:81 --> server 

With OpenSSH and PuTTY, I could do this using local port forwarding; forward local port 81 to 10.90.228.163:123. Is there a way to do this with RDP instead?

1

2 Answers 2

9

No, it is not possible with RDP.

You can install an SSH server on windows and continue to use SSH.

Alternatively, you can use netsh to do TCP forwarding as described in this answer on SO:

netsh interface portproxy add v4tov4 listenport=81 listenaddress=127.0.0.1 connectport=81 connectaddress=10.90.228.163 

Note that this will behave different ftom SSH: The connection to the connectaddress/port will originate from the machine it is listening on, instead of the target machine. Also, it will not be encrypted. This is rather a Windows equivalent for IPtables portforwarding, than for an SSH tunnel.

2
  • Will that netsh command do what I want, though? I don't want to forward traffic from one port to another on the local machine, I want to forward it from the local machine to a remote machine. Commented Sep 3, 2017 at 20:34
  • 2
    Keeping in mind that the portproxy forwarding does not provide the encryption that SSH does. Commented Sep 4, 2017 at 1:46
0

Tunneling TCP through RDP is possible using a File Tunnel.

In your case, run this on the client:

ft-win-x64.exe -L 81:server:81 --write "C:\Temp\1.dat" --read "C:\Temp\2.dat"

And run this on the server:

ft-win-x64.exe --read "\\tsclient\c\Temp\1.dat" --write "\\tsclient\c\Temp\2.dat"

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.