Search code examples
azurevirtual-machinewindows-server-2019

Cannot RDP onto Azure VM after Exposing All Ports - Windows Server 2019


I have setup a Windows Server 2019 VM in Azure, and opened all the ports (inbound and outbound) between 1024-65535 in order to get RDP to connect from my local machine. Though it states it connects in the connection troubleshoot it will not connect from my Windows 10 machine. I get:

Remote access to the server is not enabled The remote computer is turned off The remote computer is not available on the network

I have also gone to boot diagnosis and indeed its running as it should do. I also have opened an outbound connection to port 3389 just in case my machine is blocking it.

Is there something I am missing, as I followed the guides which state to open the port inbound for it to work.


Solution

  • This could happen because of static IP refer to this. This IP address differs from the address that's defined in the Azure portal. To solve this issue, you can use Serial control to enable DHCP or reset network interface for the VM.

    To enable RDP from your local machine to your Azure VM. You only need to add an inbound security rule as below, ensure that you have configured it correctly and also enabled outbound 3389 traffic from your local machine.

    enter image description here

    A general method for RDP issue is to follow the guides from virtual machine---diagnose and solve problems---can not connect to VM---troubleshoot.

    enter image description here

    Let me know if you need further help.