在 Azure 中打开端口

Opening of the port in Azure

Azure 中有一个带有 Windows Server 2016 的虚拟机。该端口在操作系统的防火墙中打开。该端口也在网络安全组中打开。我使用 telnet 检查端口 - 端口已关闭。我错过了什么吗?

您可以使用 netstat -ant|findstr <port> 检查您的服务正在侦听的 IP。

如果您的服务正在侦听 localhost(127.0.0.1),这意味着它不会接受来自其本地主机外部的任何连接。您的服务应该监听 0.0.0.0 或您 VM 的私有 IP。

I did it on the server, but the command window does not show anything.

如果显示noting,说明你的服务没有启动成功或者监听其他端口。你需要检查一下。