Cannot connect remotely to a VM because RDP port is not enabled in NSG
Artikel
Applies to: ✔️ Windows VMs
This article explains how to resolve a problem in which you cannot connect to an Azure Windows virtual machine (VM) because the Remote Desktop Protocol (RDP) port is not enabled in the network security group (NSG).
Symptom
You cannot make an RDP connection to a VM in Azure because the RDP port is not opened in the network security group.
Solution
When you create a new VM, all traffic from the Internet is blocked by default.
To enable the RDP port in an NSG, follow these steps:
In Virtual Machines, select the VM that has the problem.
In Settings, select Networking.
In Inbound port rules, check whether the port for RDP is set correctly. The following is an example of the configuration:
Priority: 300 Name: Port_3389 Port(Destination): 3389 Protocol: TCP Source: Any Destinations: Any Action: Allow
If you specify the source IP address, this setting allows traffic only from a specific IP address or range of IP addresses to connect to the VM. Make sure that the computer you are using to start the RDP session is within the range.
RDP port 3389 is exposed to the Internet. Therefore, we recommend that you use this port only for recommended for testing. For production environments, we recommend that you use a VPN or private connection.
Learn to regulate network traffic to your Azure resources by configuring and applying network security groups in the Azure portal, improving your network's security posture.