【问题标题】:Can't connect to port, although it is open无法连接到端口,虽然它是开放的
【发布时间】:2018-08-28 02:58:32
【问题描述】:

我使用 Windows 10 IoT 设置了一个 raspi。

然后我在 raspi 上设置防火墙规则以打开端口 1600,如下所示:

netsh advfirewall firewall add rule name="Open Port 1600" dir=in action=allow protocol=TCP localport=1600

netstat -an 命令显示如下:

 TCP    10.3.10.200:1600       0.0.0.0:0              LISTENING

但是当我运行命令Test-NetConnection -Port 1600 "ComputerName"(在同一子网中的计算机上)我得到

WARNING: TCP connect to (fe80::4d23:cb14:dcf6:dc5b%9 : 1600) failed


ComputerName     : ComputerName
RemoteAddress    : 10.3.10.200
RemotePort       : 1600
InterfaceAlias   : Ethernet
SourceAddress    : 10.3.10.69
TcpTestSucceeded : True

我可以毫无问题地 ping raspi。我也可以毫无问题地连接到端口 8080。 任何想法为什么连接到端口 1600 失败?

【问题讨论】:

  • 客户端尝试连接到 IPv6 地址 fe80::4d23:cb14:dcf6:dc5b。也许你的服务器只监听 IPv4。

标签: tcp raspberry-pi port firewall


【解决方案1】:

正如@SKi 建议的那样,问题可能来自尝试连接到 IPv6 地址而不是您正在收听的 IPv4 地址。相反,您可以尝试输入 IPv4 地址 10.3.10.200 作为“计算机名”,以将测试限制为 IPv4。

【讨论】:

    猜你喜欢
    • 2021-03-28
    • 1970-01-01
    • 2014-07-19
    • 1970-01-01
    • 1970-01-01
    • 2015-11-28
    • 2018-09-02
    • 2014-02-09
    • 1970-01-01
    相关资源
    最近更新 更多