QuestionQ174

VerifiedImplement and manage virtual networking

Scenario

You have an Azure subscription that contains the following resources:

  • A virtual network that has a subnet named Subnet1
  • Two network security groups (NSGs) named NSG-VM1 and NSG-Subnet1
  • A virtual machine named VM1 that has the required Windows Server configurations to allow Remote Desktop connections

NSG-Subnet1 has only the default inbound security rules.

NSG-VM1 has the default inbound security rules and the following custom inbound security rule:

  • Priority: 100
  • Source: Any
  • Source port range: *
  • Destination: *
  • Destination port range: 3389
  • Protocol: UDP
  • Action: Allow

VM1 has a public IP address and is connected to Subnet1. NSG-VM1 is associated with the network interface of VM1. NSG-Subnet1 is associated with Subnet1.

You need to be able to establish Remote Desktop connections from the internet to VM1.

Solution: You add an inbound security rule to NSG-Subnet1 and NSG-VM1 that allows connections from the Internet source to the VirtualNetwork destination for port range 3389 and uses the TCP protocol.

Does this meet the goal?

Explanation

Adding inbound security rules to both NSG-Subnet1 and NSG-VM1 that allow Internet source to VirtualNetwork destination on TCP port 3389 satisfies the RDP connectivity requirement. Azure evaluates inbound traffic against the subnet NSG first, then the network interface NSG—both must allow the traffic. Since the existing custom rule allows UDP 3389 and the new rule adds TCP 3389, the TCP-based RDP protocol will be permitted through both NSG layers.

Community Discussion

No comments yet. Be the first to start the discussion!