- A
Replace the source IP range with an application security group in the allow rule.
Why wrong: Source grouping helps manageability, but it does not fix a higher-priority deny rule.
- B
Change the protocol from TCP to Any in the allow rule.
Why wrong: The rule already matches RDP traffic; protocol broadening does not change priority order.
- C
Lower the allow rule priority number so it is evaluated before the deny rule.
NSG rules are evaluated from lowest number to highest, so the allow must come first.
- D
Add a user-defined route to the subnet so RDP traffic bypasses the NSG.
Why wrong: Routing changes do not bypass NSG filtering, because NSGs still evaluate the packet.
Why Lower Priority Numbers in Azure NSG Rules Are Processed First
This AZ-104 practice question tests your understanding of implement and manage virtual networking. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A subnet NSG contains a deny inbound rule for TCP 3389 from Any at priority 100 and an allow inbound rule for TCP 3389 from 10.4.1.0/24 at priority 200. Admin workstations in 10.4.1.0/24 cannot connect by RDP. What change should the administrator make?
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
Lower the allow rule priority number so it is evaluated before the deny rule.
The correct answer is C because NSG rules are evaluated in priority order, with lower numbers having higher priority. The deny rule at priority 100 blocks all TCP 3389 traffic from Any, and the allow rule at priority 200 is never reached. Lowering the allow rule's priority number (e.g., to 90) ensures it is evaluated before the deny rule, allowing RDP traffic from 10.4.1.0/24.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Replace the source IP range with an application security group in the allow rule.
Why it's wrong here
Source grouping helps manageability, but it does not fix a higher-priority deny rule.
When this WOULD be correct
If the question described a scenario where the allow rule uses an application security group but the source IPs are not members, or if the deny rule's source is set to 'Any' and the allow rule's source is an ASG that includes the admin workstations, then replacing the source IP range with the ASG in the allow rule would be correct to ensure the allow rule matches the traffic.
- ✗
Change the protocol from TCP to Any in the allow rule.
Why it's wrong here
The rule already matches RDP traffic; protocol broadening does not change priority order.
- ✓
Lower the allow rule priority number so it is evaluated before the deny rule.
Why this is correct
NSG rules are evaluated from lowest number to highest, so the allow must come first.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Add a user-defined route to the subnet so RDP traffic bypasses the NSG.
Why it's wrong here
Routing changes do not bypass NSG filtering, because NSGs still evaluate the packet.
When this WOULD be correct
A UDR would be correct if the question described a scenario where RDP traffic to a VM in a peered VNet is being dropped due to asymmetric routing or a forced-tunneling configuration, requiring a custom route to direct traffic correctly.
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.
✓Lower the allow rule priority number so it is evaluated before the deny rule.Correct answer▾
Why this is correct
NSG rules are evaluated from lowest number to highest, so the allow must come first.
✗Replace the source IP range with an application security group in the allow rule.Wrong answer — click to see why▾
Why this is wrong here
The deny rule at priority 100 blocks all inbound RDP traffic, including from 10.4.1.0/24, because NSG rules are evaluated in priority order (lower number = higher priority). Replacing the source IP range with an application security group does not change the evaluation order; the deny rule still applies first.
★ When this WOULD be the correct answer
If the question described a scenario where the allow rule uses an application security group but the source IPs are not members, or if the deny rule's source is set to 'Any' and the allow rule's source is an ASG that includes the admin workstations, then replacing the source IP range with the ASG in the allow rule would be correct to ensure the allow rule matches the traffic.
Why candidates choose this
Candidates may think that using an application security group provides more granular control and might override the deny rule, not realizing that NSG rules are evaluated strictly by priority number regardless of rule type.
✗Change the protocol from TCP to Any in the allow rule.Wrong answer — click to see why▾
Why this is wrong here
The allow rule already permits TCP 3389, so changing the protocol to Any would not fix the issue. The problem is that the deny rule at priority 100 blocks all TCP 3389 traffic before the allow rule at priority 200 is evaluated.
★ When this WOULD be the correct answer
If the allow rule were intended to permit all RDP traffic (including UDP) from 10.4.1.0/24, and the deny rule only blocked TCP 3389, then changing the protocol to Any would allow UDP-based RDP connections.
Why candidates choose this
Candidates may think that the allow rule is too restrictive by only allowing TCP, and that expanding to Any would override the deny rule, not realizing that NSG priority order determines rule evaluation.
✗Add a user-defined route to the subnet so RDP traffic bypasses the NSG.Wrong answer — click to see why▾
Why this is wrong here
NSGs filter traffic within a subnet; they do not route traffic. Adding a UDR would affect routing but cannot bypass NSG rules, as NSGs are evaluated after routing. The issue is rule priority, not routing.
★ When this WOULD be the correct answer
A UDR would be correct if the question described a scenario where RDP traffic to a VM in a peered VNet is being dropped due to asymmetric routing or a forced-tunneling configuration, requiring a custom route to direct traffic correctly.
Why candidates choose this
Candidates may confuse network security groups with routing, thinking that adding a route can override NSG deny rules, or they may misunderstand the role of UDRs in controlling traffic flow versus filtering.
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?”
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume allow rules automatically override deny rules, but Azure NSGs use first-match evaluation based on priority numbers, not rule type.
Detailed technical explanation
How to think about this question
Azure NSGs process rules in ascending priority order (lowest number first) and stop at the first match; a deny rule at priority 100 for TCP 3389 from Any will block all RDP traffic, including from 10.4.1.0/24, before the allow rule at priority 200 is evaluated. This is a common misconfiguration where administrators assume allow rules override deny rules, but in Azure, the first matching rule applies, and deny rules take precedence if they appear earlier. In real-world scenarios, always plan priority numbering with gaps (e.g., 100, 200, 300) to allow insertion of new rules without renumbering.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.
Visual reference
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Implement and Manage Virtual Networking — study guide chapter
Learn the concepts, then practise the questions
- →
Implement and Manage Virtual Networking practice questions
Targeted practice on this topic area only
- →
All AZ-104 questions
1,170 questions across all exam domains
- →
AZ-104 study guide
Full concept coverage aligned to exam objectives
- →
AZ-104 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related AZ-104 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Manage Azure Identities and Governance practice questions
Practise AZ-104 questions linked to Manage Azure Identities and Governance.
Implement and Manage Storage practice questions
Practise AZ-104 questions linked to Implement and Manage Storage.
Deploy and Manage Azure Compute practice questions
Practise AZ-104 questions linked to Deploy and Manage Azure Compute.
Implement and Manage Virtual Networking practice questions
Practise AZ-104 questions linked to Implement and Manage Virtual Networking.
Monitor and Maintain Azure Resources practice questions
Practise AZ-104 questions linked to Monitor and Maintain Azure Resources.
AZ-104 Azure RBAC practice questions
Practise AZ-104 questions linked to AZ-104 Azure RBAC.
AZ-104 storage account practice questions
Practise AZ-104 questions linked to AZ-104 storage account.
AZ-104 virtual network practice questions
Practise AZ-104 questions linked to AZ-104 virtual network.
AZ-104 NSG practice questions
Practise AZ-104 questions linked to AZ-104 NSG.
AZ-104 Azure Monitor practice questions
Practise AZ-104 questions linked to AZ-104 Azure Monitor.
AZ-104 backup practice questions
Practise AZ-104 questions linked to AZ-104 backup.
AZ-104 managed identity practice questions
Practise AZ-104 questions linked to AZ-104 managed identity.
Practice this exam
Start a free AZ-104 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this AZ-104 question test?
Implement and Manage Virtual Networking — This question tests Implement and Manage Virtual Networking — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Lower the allow rule priority number so it is evaluated before the deny rule. — The correct answer is C because NSG rules are evaluated in priority order, with lower numbers having higher priority. The deny rule at priority 100 blocks all TCP 3389 traffic from Any, and the allow rule at priority 200 is never reached. Lowering the allow rule's priority number (e.g., to 90) ensures it is evaluated before the deny rule, allowing RDP traffic from 10.4.1.0/24.
What should I do if I get this AZ-104 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
5 more ways this is tested on AZ-104
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A subnet has an NSG with an inbound allow rule for TCP 3389 at priority 200 and an inbound deny rule for Internet traffic at priority 100. An administrator still cannot RDP to a virtual machine in the subnet from home. What is the most likely reason?
medium- A.The allow rule is ignored because inbound rules cannot permit RDP.
- ✓ B.The deny rule wins because lower priority numbers are processed first.
- C.NSG rules apply only to outbound traffic, so inbound traffic is unaffected.
- D.The subnet NSG is ignored whenever the VM has a public IP address.
Why B: In Azure Network Security Groups (NSGs), rules are processed in priority order, with lower numbers evaluated first. The deny rule for Internet traffic at priority 100 is processed before the allow rule for TCP 3389 at priority 200, so the deny rule blocks the inbound RDP connection from the internet. This is why the administrator cannot RDP from home.
Variation 2. A subnet has these inbound NSG rules: Rule 100 denies TCP 3389 from Internet, Rule 200 allows TCP 3389 from 10.0.0.0/8, and Rule 300 allows TCP 3389 from AzureLoadBalancer. An administrator in 10.20.5.4 cannot RDP to a VM in the subnet. Why is the connection denied?
medium- ✓ A.The deny rule at priority 100 matches before the allow rule at priority 200.
- B.The AzureLoadBalancer service tag blocks all other inbound traffic on that port.
- C.The VM needs a public IP address for RDP to work from a private source.
- D.NSG rules are processed by longest prefix match, so the /8 source loses to the /32 VM address.
Why A: Option A is correct. Network Security Group (NSG) rules are evaluated in priority order, from lowest number to highest. Rule 100 at priority 100 denies TCP port 3389 from the Internet source. The administrator's IP address 10.20.5.4 is not part of the VNet's address space (the VNet does not include 10.20.0.0/16), so it is considered Internet traffic. Therefore, Rule 100 matches and denies the traffic before Rule 200 (which allows from 10.0.0.0/8) can be evaluated.
Variation 3. A VM has an NSG with these inbound rules: Deny-RDP at priority 100 for TCP 3389 from Any, and Allow-RDP-Admins at priority 200 for TCP 3389 from 10.8.1.0/24. Admins from 10.8.1.0/24 still cannot connect by RDP. What change fixes access while keeping all other sources blocked?
medium- A.Change the deny rule to protocol Any so the allow rule will be evaluated first.
- B.Add a UDR that sends TCP 3389 traffic to the VM subnet.
- ✓ C.Move the allow rule to a lower priority number than 100.
- D.Associate an application security group with the VM and keep the existing priorities.
Why C: C is correct because NSG rules are evaluated in priority order, with lower numbers evaluated first. The Deny-RDP rule at priority 100 is evaluated before the Allow-RDP-Admins rule at priority 200, so traffic from 10.8.1.0/24 is denied before the allow rule is reached. Moving the allow rule to a priority lower than 100 (e.g., 90) ensures it is evaluated first, allowing the admin traffic while the deny rule still blocks all other sources.
Variation 4. A backend VM must accept TCP 8443 only from the web tier. The subnet NSG already has a deny-all inbound rule at priority 200. The administrator adds an allow rule for the web tier at priority 300, but the connection still fails. What should be changed?
medium- ✓ A.Change the allow rule to a lower priority number than 200.
- B.Change the allow rule protocol from TCP to Any.
- C.Move the VM to a different subnet so the rule can apply.
- D.Add a route table entry for TCP 8443 to bypass the NSG.
Why A: Azure Network Security Groups (NSGs) process rules in priority order, with lower numbers evaluated first. The existing deny-all inbound rule at priority 200 is evaluated before the new allow rule at priority 300, so the deny rule blocks the traffic before the allow rule can be considered. To permit TCP 8443 from the web tier, the allow rule must have a priority number lower than 200 (e.g., 100) so it is evaluated first and allows the traffic.
Variation 5. A VM in AppSubnet must reach a database VM in DbSubnet on TCP 1433. AppSubnet's NSG has an outbound deny rule for TCP 1433 to Any at priority 200. DbSubnet's NSG has an inbound allow rule for TCP 1433 from ASG-App to ASG-Db at priority 300. Both NICs are in the correct application security groups. Connectivity tests fail. What should the administrator change?
hard- A.Remove the inbound allow rule from DbSubnet so the default rules can take over.
- B.Move the inbound allow rule on DbSubnet to priority 100 so it is evaluated sooner.
- ✓ C.Create an outbound allow rule on AppSubnet with a lower priority number than 200 for TCP 1433 to ASG-Db.
- D.Assign the database VM NIC to ASG-App so the destination rule matches a broader group.
Why C: Option C is correct because the AppSubnet's NSG has an outbound deny rule for TCP 1433 to Any at priority 200, which blocks all outbound traffic on that port regardless of destination. To allow the VM in AppSubnet to reach the database VM in DbSubnet, an outbound allow rule must be created with a lower priority number (e.g., 100) so it is evaluated before the deny rule. This rule should specify the destination as ASG-Db (the application security group of the database VM) to precisely permit the required traffic.
Keep practising
More AZ-104 practice questions
- A storage automation service principal must upload, read, and delete blob data in one container by using Microsoft Entra…
- A subnet contains several application servers. You need to allow inbound TCP 3389 only from a management subnet named Su…
- A subscription admin wants to investigate who changed a resource and also review the platform-generated events for that…
- Based on the exhibit, which Azure feature should the administrator use to track this kind of platform-wide service issue…
- An administrator wants a script running on an Azure VM to create a resource in Azure without storing any passwords or cl…
- A PowerShell script runs on an Azure VM every night and uses Azure CLI commands to create tags and VM resources in anoth…
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.