大网数据广告活动
服务器运维问答

RDP equivalent to SSH port forwarding?

· 52CE 我爱测

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.1…

问题原文

原帖链接 · Jez · CC BY-SA 3.0

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?

已采纳解答

原帖链接 · Gerald Schneider · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-09-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。