我遇到了一个奇怪的问题。当我尝试使用本地 IP(192.168.0.30)通过 RDP 连接到我的服务器时,我的 RDP 客户端卡在“协商凭据”上。如果我使用我的公共/互联网 IP(暴露在互联网上的端口 3389),它就可以正常工作。
下面的每个客户端都表现出相同的行为(使用 WAN IP 工作;使用 LAN IP 失败)
经过测试的 RDP 客户端:
- 微软远程桌面 Mac
- Microsoft 远程桌面 Mac Beta 版
- 远程桌面连接(Windows 内置)
- Microsoft RDP 客户端 Android
Windows 版本:8.1 Pro
一些日志:
[2018-Apr-15 10:58:50] RDP (0): --- BEGIN INTERFACE LIST ---
[2018-Apr-15 10:58:50] RDP (0): lo0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): lo0 af=2 (AF_INET) addr=127.0.0.1 netmask=255.0.0.0
[2018-Apr-15 10:58:50] RDP (0): lo0 af=30 (AF_INET6) addr=::1 netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
[2018-Apr-15 10:58:50] RDP (0): lo0 af=30 (AF_INET6) addr=fe80::1%lo0 netmask=ffff:ffff:ffff:ffff::
[2018-Apr-15 10:58:50] RDP (0): gif0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): stf0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): en0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): en0 af=30 (AF_INET6) addr=fe80::1088:3af5:ffd5:d57b%en0 netmask=ffff:ffff:ffff:ffff::
[2018-Apr-15 10:58:50] RDP (0): en0 af=2 (AF_INET) addr=192.168.0.25 netmask=255.255.255.0
[2018-Apr-15 10:58:50] RDP (0): en1 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): en2 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): bridge0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): p2p0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): awdl0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): awdl0 af=30 (AF_INET6) addr=fe80::784a:38ff:fee3:da4d%awdl0 netmask=ffff:ffff:ffff:ffff::
[2018-Apr-15 10:58:50] RDP (0): utun0 af=18 addr= netmask=
[2018-Apr-15 10:58:50] RDP (0): utun0 af=30 (AF_INET6) addr=fe80::b2eb:9d8e:546f:9c59%utun0 netmask=ffff:ffff:ffff:ffff::
[2018-Apr-15 10:58:50] RDP (0): --- END INTERFACE LIST ---
[2018-Apr-15 10:58:50] RDP (0): correlation id: correlation not set or of invalid length
[2018-Apr-15 10:58:50] RDP (0): Resolved '192.168.0.30' to '192.168.0.30' using NameResolveMethod_DNS(1)
[2018-Apr-15 10:58:50] RDP (0): Protocol state changed to: ProtocolConnectingNetwork(1)
[2018-Apr-15 10:58:50] RDP (0): Protocol state changed to: ProtocolNegotiatingCredentials(2)
[2018-Apr-15 10:59:11] RDP (0): Exception caught: Exception in file '../../librdpclient/asiosocketendpoint.cpp' at line 400
User Message : Connection reset by peer
[2018-Apr-15 10:59:11] RDP (0): correlation id: correlation not set or of invalid length
[2018-Apr-15 10:59:11] RDP (0): Protocol state changed to: ProtocolConnectingNetwork(1)
[2018-Apr-15 10:59:11] RDP (0): Resolved '192.168.0.30' to '192.168.0.30' using NameResolveMethod_DNS(1)
[2018-Apr-15 10:59:11] RDP (0): Protocol state changed to: ProtocolNegotiatingCredentials(2)
[2018-Apr-15 10:59:32] RDP (0): Exception caught: Exception in file '../../librdpclient/asiosocketendpoint.cpp' at line 400
User Message : Connection reset by peer
[2018-Apr-15 10:59:32] RDP (0): Protocol state changed to: ProtocolDisconnecting(7)
[2018-Apr-15 10:59:32] RDP (0): Protocol state changed to: ProtocolDisconnected(8)
[2018-Apr-15 10:59:32] RDP (0): ------ END ACTIVE CONNECTION ------
Windows 防火墙已关闭并且未安装防病毒软件。
我想不出使用本地 IP 时失败的任何原因。我只能假设这是路由器或主机上的配置问题。