- A
The on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the UDR
BGP-learned routes for on-premises networks are more specific than 0.0.0.0/0. They will be used even if a UDR for 0.0.0.0/0 exists. To force through firewall, you must either disable BGP route propagation or create specific UDRs for on-premises ranges.
- B
The UDR must be applied to the subnet that hosts the Azure Firewall
Why wrong: UDRs are applied to source subnets, not the firewall subnet. The spoke subnet UDR is correctly configured.
- C
The spoke subnet does not have 'GatewaySubnet' route propagation enabled
Why wrong: Route propagation refers to learning BGP routes from a VPN gateway. If it were disabled, the spoke would not learn on-premises routes and would use the 0.0.0.0/0 UDR for all traffic. In this case, the problem is that propagation is enabled and the more specific routes override.
- D
The Azure Firewall is not configured with a route to the on-premises network
Why wrong: The firewall needs a route to the on-premises network to forward traffic, but that does not explain why traffic bypasses the firewall from the spoke.
Quick Answer
The answer is that the on-premises traffic bypasses the Azure Firewall because a more specific route learned via BGP from the VPN gateway overrides the user-defined route (UDR). In Azure’s routing hierarchy, when a UDR and a BGP-propagated route both apply, the route with the longest prefix match wins—so a BGP-learned route for a specific on-premises prefix like 10.0.0.0/16 takes precedence over a UDR’s 0.0.0.0/0 default route, even though the UDR points to the firewall. This scenario is a classic trap on the AZ-500 exam, testing your understanding of how BGP routes interact with forced tunneling and hub-spoke designs. The key insight is that a default route (0.0.0.0/0) is less specific than any advertised on-premises prefix, so traffic to those networks will bypass the firewall unless you either disable BGP route propagation on the spoke subnet or add a more specific UDR for the on-premises range. Remember: BGP beats UDR when the prefix is longer, so always check your route tables for specificity.
AZ-500 Secure networking Practice Question
This AZ-500 practice question tests your understanding of secure networking. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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.
Your company has an Azure subscription with a hub-spoke network topology. The hub contains an Azure Firewall and a VPN gateway for on-premises connectivity. The spoke virtual network hosts a critical application. You need to ensure that all outbound traffic from the spoke to the internet and on-premises networks flows through the Azure Firewall. You configure a user-defined route (UDR) on the spoke subnet with the default route (0.0.0.0/0) pointing to the Azure Firewall private IP. However, traffic to on-premises still bypasses the firewall. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue:
"most likely"Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
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 on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the UDR
The most likely cause is that the on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the user-defined route (UDR). In Azure, when a UDR and a BGP-propagated route both match traffic, the route with the most specific prefix (longest prefix match) wins. Since on-premises networks are typically advertised with specific IP prefixes (e.g., 10.0.0.0/16) rather than 0.0.0.0/0, the BGP-learned routes take precedence, causing traffic to bypass the Azure Firewall.
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.
- ✓
The on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the UDR
Why this is correct
BGP-learned routes for on-premises networks are more specific than 0.0.0.0/0. They will be used even if a UDR for 0.0.0.0/0 exists. To force through firewall, you must either disable BGP route propagation or create specific UDRs for on-premises ranges.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
The UDR must be applied to the subnet that hosts the Azure Firewall
Why it's wrong here
UDRs are applied to source subnets, not the firewall subnet. The spoke subnet UDR is correctly configured.
- ✗
The spoke subnet does not have 'GatewaySubnet' route propagation enabled
- ✗
The Azure Firewall is not configured with a route to the on-premises network
Why it's wrong here
The firewall needs a route to the on-premises network to forward traffic, but that does not explain why traffic bypasses the firewall from the spoke.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume a default route (0.0.0.0/0) UDR will always override all other routes, but Azure's route selection uses longest prefix match, so more specific BGP-learned routes for on-premises networks will take precedence over the default UDR.
Detailed technical explanation
How to think about this question
Azure uses a route selection hierarchy where BGP-propagated routes from a VPN gateway or ExpressRoute are preferred over UDRs when they have a more specific prefix (longer subnet mask). This is consistent with the longest prefix match algorithm defined in RFC 1812. In a hub-spoke topology, if the VPN gateway advertises on-premises prefixes via BGP, those routes are automatically propagated to the spoke virtual network (if peering is configured with 'Use remote virtual network gateway'), and they will override a default UDR (0.0.0.0/0) for those specific destinations. To force all traffic through the firewall, you must either disable BGP route propagation on the spoke subnet (using the 'Virtual network gateway route propagation' setting) or add more specific UDRs for the on-premises prefixes.
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.
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.
- →
Secure networking — study guide chapter
Learn the concepts, then practise the questions
- →
Secure networking practice questions
Targeted practice on this topic area only
- →
All AZ-500 questions
1,000 questions across all exam domains
- →
Microsoft Azure Security Engineer Associate AZ-500 study guide
Full concept coverage aligned to exam objectives
- →
AZ-500 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related AZ-500 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Secure identity and access practice questions
Practise AZ-500 questions linked to Secure identity and access.
Secure compute, storage, and databases practice questions
Practise AZ-500 questions linked to Secure compute, storage, and databases.
Secure Azure using Microsoft Defender for Cloud and Microsoft Sentinel practice questions
Practise AZ-500 questions linked to Secure Azure using Microsoft Defender for Cloud and Microsoft Sentinel.
Manage identity and access practice questions
Practise AZ-500 questions linked to Manage identity and access.
Secure networking practice questions
Practise AZ-500 questions linked to Secure networking.
AZ-500 fundamentals practice questions
Practise AZ-500 questions linked to AZ-500 fundamentals.
AZ-500 scenario practice questions
Practise AZ-500 questions linked to AZ-500 scenario.
AZ-500 troubleshooting practice questions
Practise AZ-500 questions linked to AZ-500 troubleshooting.
Practice this exam
Start a free AZ-500 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-500 question test?
Secure networking — This question tests Secure networking — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the UDR — The most likely cause is that the on-premises traffic uses a more specific route learned via BGP from the VPN gateway, which overrides the user-defined route (UDR). In Azure, when a UDR and a BGP-propagated route both match traffic, the route with the most specific prefix (longest prefix match) wins. Since on-premises networks are typically advertised with specific IP prefixes (e.g., 10.0.0.0/16) rather than 0.0.0.0/0, the BGP-learned routes take precedence, causing traffic to bypass the Azure Firewall.
What should I do if I get this AZ-500 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
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 →
Last reviewed: Jun 11, 2026
This AZ-500 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-500 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.