AZ-104 Implement and Manage Virtual Networking Practice Question
A subnet NSG contains these inbound rules: Deny-All-Inbound at priority 300, Allow-HTTPS-From-Bastion at priority 200, and Allow-HTTPS-From-AdminIP at priority 350. An administrator expects a management workstation on the internet to connect to a VM over TCP 443, but the connection is blocked. What is the most likely reason?
⚠ Common exam trap
Many exam-takers confuse 'priority' with 'order of evaluation,' mistakenly thinking higher priority numbers are evaluated first, when in fact lower numbers (higher priority) are evaluated first, causing the deny rule to block traffic before the allow rule is checked.
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
✓
The deny rule at priority 300 is matched before the allow rule at priority 350.
NSG rules are evaluated in priority order, from the lowest priority number (highest priority) to the highest priority number (lowest priority). The Allow-HTTPS-From-AdminIP rule at priority 350 is evaluated after the Deny-All-Inbound rule at priority 300. Since the deny rule at priority 300 matches all inbound traffic before the allow rule at priority 350 is evaluated, the traffic is blocked. The administrator's connection from the internet is denied because the deny rule with a lower priority number (300) takes precedence over the allow rule with a higher priority number (350).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
NSG rules are evaluated from the highest priority number to the lowest priority number.
Why it's wrong here
Azure NSG rules are processed in ascending order of the priority value, meaning the rule with the lowest number is evaluated first. A priority 100 rule takes precedence over a priority 200 rule, not the reverse. Therefore, saying rules are evaluated from highest to lowest priority exactly reverses the actual behavior, which is why this option is wrong.
When this WOULD be correct
This would be correct if the question described a different rule evaluation order, such as in a hypothetical scenario where NSG rules are evaluated from highest to lowest priority number, or if the question asked about the default evaluation order of custom routes instead of NSG rules.
- ✓
The deny rule at priority 300 is matched before the allow rule at priority 350.
Why this is correct
NSG rules are processed in ascending order, where the lowest priority number wins. In this case, Deny-All-Inbound at 300 is evaluated before the new allow rule at 350. Because the deny rule matches inbound traffic first, the packet is blocked and the later allow rule never gets a chance. The fix is to give the allow rule a lower number than 300 or otherwise narrow the deny rule.
- ✗
Azure NSGs cannot allow inbound traffic from public IP addresses.
Why it's wrong here
Azure NSGs are fully capable of allowing inbound traffic from public IP addresses; there is no restriction on the source being a public address. NSG rules define source as IP ranges, service tags, or application security groups, and any IP address, including public ones, can be used. The rule will work as long as its priority is lower (numerically) than any conflicting deny rule, but the NSG itself does not prohibit public sources.
When this WOULD be correct
This would be correct if the question stated that Azure NSGs cannot allow inbound traffic from public IP addresses when the VM is in a virtual network that uses forced tunneling, or if the NSG is associated with a subnet that has a route table directing all traffic to a firewall. In those cases, the NSG rule might be ineffective, but the statement itself is false.
- ✗
TCP 443 requires an application security group to be used as the source.
Why it's wrong here
Application security groups are not a prerequisite for allowing TCP 443; they are simply a way to group VM network interfaces for rule targeting. An NSG rule can use a source of 'Any', an IP address, a CIDR block, or a service tag just as easily. For a fixed public IP, you would set the source to that IP or range, with no ASG required. Thus, this statement is incorrect.
When this WOULD be correct
In a scenario where a VM's NIC has an NSG with a rule that specifies an application security group as the source, but the VM is not a member of that ASG, causing traffic to be denied. The question would state that the rule uses an ASG source and the VM is not in the ASG.
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.
✓The deny rule at priority 300 is matched before the allow rule at priority 350.Correct answer▾
Why this is correct
NSG rules are processed in ascending order, where the lowest priority number wins. In this case, Deny-All-Inbound at 300 is evaluated before the new allow rule at 350. Because the deny rule matches inbound traffic first, the packet is blocked and the later allow rule never gets a chance. The fix is to give the allow rule a lower number than 300 or otherwise narrow the deny rule.
✗NSG rules are evaluated from the highest priority number to the lowest priority number.Wrong answer — click to see why▾
Why this is wrong here
NSG rules are evaluated from lowest priority number to highest, meaning a lower number (higher priority) is matched first. Option A states the opposite, which is incorrect.
★ When this WOULD be the correct answer
This would be correct if the question described a different rule evaluation order, such as in a hypothetical scenario where NSG rules are evaluated from highest to lowest priority number, or if the question asked about the default evaluation order of custom routes instead of NSG rules.
Why candidates choose this
Candidates may confuse NSG priority with other numbering systems (e.g., route tables where lower metric is preferred) or mistakenly think higher numbers mean higher priority.
✗Azure NSGs cannot allow inbound traffic from public IP addresses.Wrong answer — click to see why▾
Why this is wrong here
Azure NSGs can allow inbound traffic from public IP addresses by specifying the public IP as the source in the rule. The Allow-HTTPS-From-AdminIP rule at priority 350 is intended to do that, but it is never evaluated because the Deny-All-Inbound rule at priority 300 is matched first.
★ When this WOULD be the correct answer
This would be correct if the question stated that Azure NSGs cannot allow inbound traffic from public IP addresses when the VM is in a virtual network that uses forced tunneling, or if the NSG is associated with a subnet that has a route table directing all traffic to a firewall. In those cases, the NSG rule might be ineffective, but the statement itself is false.
Why candidates choose this
Candidates may mistakenly believe that Azure NSGs only support private IP ranges or that public IPs must be handled differently, confusing NSG capabilities with Azure Firewall or other network security features.
✗TCP 443 requires an application security group to be used as the source.Wrong answer — click to see why▾
Why this is wrong here
TCP 443 (HTTPS) can be allowed from public IP addresses using a standard NSG rule with the source set to 'Any' or a specific public IP address; an application security group is not required for this purpose.
★ When this WOULD be the correct answer
In a scenario where a VM's NIC has an NSG with a rule that specifies an application security group as the source, but the VM is not a member of that ASG, causing traffic to be denied. The question would state that the rule uses an ASG source and the VM is not in the ASG.
Why candidates choose this
Candidates may confuse application security groups with network security groups, thinking that ASGs are mandatory for allowing traffic from the internet, when in fact ASGs are used to group VMs and simplify rule management, not to enable internet connectivity.
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
Go deeper
Related to this question
Learn chapter
Privileged Identity Management (PIM)
Key term
TCP
TCP (Transmission Control Protocol) is a core internet protocol that ensures data is sent reliably and in order between devices over a network.
Key term
Subnet
A subnet is a logical subdivision of an IP network, created by partitioning a larger network address space using subnet masks.
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 →
Same concept, more angles
1 more way 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 a custom inbound deny-all rule at priority 200. You need to allow HTTPS traffic to a VM in that subnet from any source. Which action should you take?
easy- A.Create an inbound allow rule for TCP 443 with priority 300.
- ✓ B.Create an inbound allow rule for TCP 443 with priority 100.
- C.Change the deny-all rule to outbound instead of inbound.
- D.Add a route table entry for port 443 traffic to the VM subnet.
Why B: NSG rules are evaluated in priority order, with lower numbers evaluated first. The existing deny-all rule at priority 200 blocks all inbound traffic. To allow HTTPS (TCP 443) before the deny rule is evaluated, you must create an allow rule with a priority lower than 200, such as priority 100. This ensures the allow rule is processed first, permitting the traffic.
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.