Courseiva
Implement and Manage Virtual NetworkingmediumMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Virtual Networking Practice Question

A VM in subnet S1 must accept RDP only from the administrator workstation at 203.0.113.25. The subnet NSG has a custom inbound deny-all rule at priority 200 and a custom allow-RDP rule at priority 300 for source 203.0.113.25, destination Any, TCP 3389. RDP is still blocked from the workstation. What should the administrator change?

⚠ Common exam trap

Candidates often assume rules are evaluated in the order they appear in the portal (top to bottom) or that a more specific rule (allow-RDP) overrides a general rule (deny-all), but Azure NSGs strictly use numeric priority, not specificity or order of creation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Move the allow-RDP rule to a lower priority number than 200.

Network Security Group (NSG) rules are evaluated in priority order, with lower numbers having higher precedence. The deny-all rule at priority 200 is evaluated before the allow-RDP rule at priority 300, so the deny rule blocks the RDP traffic before the allow rule can be applied. To allow RDP from the workstation, the allow-RDP rule must have a lower priority number (e.g., 100) than the deny-all rule, ensuring it is evaluated first.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Move the allow-RDP rule to a lower priority number than 200.

    Why this is correct

    NSG rules are processed in priority order, where lower numbers are evaluated first. Because the deny-all rule at priority 200 is hit before the allow rule at 300, the RDP traffic is denied before it can match the allow entry. Moving the allow rule to a number lower than 200, such as 100, ensures the authorized workstation is permitted while the later deny-all rule still blocks everyone else.

  • Change the allow rule from inbound to outbound traffic.

    Why it's wrong here

    RDP access from a workstation to a VM is inbound traffic from the perspective of the VM's network interface, so the rule must be configured as an inbound rule. Changing it to outbound would apply to traffic leaving the VM, which is irrelevant to a remote client initiating a connection to port 3389 on the VM. Inbound NSG rules are evaluated for the first packet of a connection, and the deny-all inbound rule at priority 200 would still block the connection before any outbound rule could have an effect.

    When this WOULD be correct

    If the question required the VM to initiate RDP connections to the administrator workstation (e.g., for remote management from the VM), then an outbound allow rule would be correct. For example: 'A VM must be able to RDP to a management server at 203.0.113.25.'

  • Change the protocol from TCP to Any on the deny-all rule.

    Why it's wrong here

    Changing the deny-all rule's protocol from TCP to Any is counterproductive because the existing deny-all rule already blocks all protocols, including TCP. The real issue is rule priority: the deny rule at priority 200 is evaluated before the allow-RDP rule at priority 300, so the RDP packet is denied before the allow rule is ever considered. Broadening the deny rule to Any would simply expand the block to UDP and ICMP as well, making it even harder for any RDP traffic to be accepted, and it would not fix the order-of-evaluation problem.

    When this WOULD be correct

    This option would be correct in a scenario where the deny-all rule is set to block only TCP traffic, and the required traffic uses a different protocol (e.g., UDP). Changing the protocol to Any would then block all traffic, which might be desired to tighten security.

  • Attach a user-defined route so the workstation can reach the VM directly.

    Why it's wrong here

    A user-defined route (UDR) controls the next hop for packets, such as directing traffic through a network virtual appliance, but it does not influence NSG rule evaluation. Even if the UDR makes the workstation's packets reach the VM's subnet, the inbound NSG deny-all rule at priority 200 will still drop the RDP packet on port 3389 before it can reach the VM's operating system. RDP access is governed by NSG allow rules for inbound traffic; routing only affects the layer-3 path, not layer-4 security filtering.

    When this WOULD be correct

    A VM in subnet S1 cannot communicate with a VM in subnet S2 even though both NSGs allow traffic. The correct solution is to create a user-defined route in subnet S1's route table with next hop as the virtual appliance or direct peering to enable connectivity between subnets.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

Move the allow-RDP rule to a lower priority number than 200.Correct answer

Why this is correct

NSG rules are processed in priority order, where lower numbers are evaluated first. Because the deny-all rule at priority 200 is hit before the allow rule at 300, the RDP traffic is denied before it can match the allow entry. Moving the allow rule to a number lower than 200, such as 100, ensures the authorized workstation is permitted while the later deny-all rule still blocks everyone else.

Change the allow rule from inbound to outbound traffic.Wrong answer — click to see why

Why this is wrong here

The question concerns inbound RDP traffic to the VM; an outbound rule would not affect inbound connections. The NSG is applied to the subnet, so outbound rules control traffic leaving the subnet, not incoming RDP.

★ When this WOULD be the correct answer

If the question required the VM to initiate RDP connections to the administrator workstation (e.g., for remote management from the VM), then an outbound allow rule would be correct. For example: 'A VM must be able to RDP to a management server at 203.0.113.25.'

Why candidates choose this

Candidates may confuse inbound and outbound rule directions, thinking that allowing traffic from the workstation requires an outbound rule on the subnet NSG, not realizing that inbound rules control traffic entering the subnet.

Change the protocol from TCP to Any on the deny-all rule.Wrong answer — click to see why

Why this is wrong here

Changing the protocol from TCP to Any on the deny-all rule would not resolve the issue because the deny-all rule already blocks all traffic, including RDP. The problem is that the allow-RDP rule at priority 300 is never evaluated because the deny-all rule at priority 200 is processed first.

★ When this WOULD be the correct answer

This option would be correct in a scenario where the deny-all rule is set to block only TCP traffic, and the required traffic uses a different protocol (e.g., UDP). Changing the protocol to Any would then block all traffic, which might be desired to tighten security.

Why candidates choose this

Candidates may think that the deny-all rule is too restrictive and that making it less specific (by changing protocol to Any) would allow the allow rule to take effect, not realizing that the priority order is the actual issue.

Attach a user-defined route so the workstation can reach the VM directly.Wrong answer — click to see why

Why this is wrong here

A user-defined route (UDR) controls traffic routing between subnets or to on-premises, not NSG rule evaluation. Since the workstation and VM are in the same virtual network, traffic already reaches the VM; the issue is that the NSG deny-all rule at priority 200 blocks RDP before the allow rule at priority 300 is evaluated.

★ When this WOULD be the correct answer

A VM in subnet S1 cannot communicate with a VM in subnet S2 even though both NSGs allow traffic. The correct solution is to create a user-defined route in subnet S1's route table with next hop as the virtual appliance or direct peering to enable connectivity between subnets.

Why candidates choose this

Candidates may think that routing is the problem because RDP is blocked, but they overlook that NSG rules are evaluated in priority order and that a lower priority number means higher precedence.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.