将RDP端口更改为443后,无法连接到Azure VM

时间:2017-09-23 12:12:27

标签: azure remote-access azure-virtual-machine powershell-remoting

我已经设置了运行Windows 10 Client的Azure虚拟机。根据以下帖子,我将RDP端口更改为443,但未添加VM防火墙规则并重新启动VM。 New Azure portal (no End Points) how to connect to VM with RDP from behind a firewall 现在我无法连接到我的Azure VM。我尝试了以下的事情 1)由于WinRM被禁用,因此无法连接到远程Powershell。我尝试启用它但不知何故不起作用 2)阅读有关将此VM硬盘连接到第二个VM并在第二个VM中加载注册表的信息。但不知道该怎么做。

任何建议。

1 个答案:

答案 0 :(得分:2)

您可以使用Azure Custom Script Extension在Windows防火墙上打开端口。请参考以下步骤:

1.启动虚拟机。

2.编写脚本以在Windows防火墙上打开端口。如下所示:

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

3.通过自定义脚本扩展执行此脚本,您可以在Azure门户上执行此操作。 Your VM - > Extensions - > + - > Custom Script Extension

enter image description here

注意:您还需要在Azure NSG上打开端口443。选择服务后,请选择Custom而不是https