Courseiva
Implement and Manage Virtual NetworkingmediumMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Virtual Networking Practice Question

A subnet is connected to a NAT gateway, but outbound connections to a public software update site are still leaving through a network virtual appliance. The route table contains a 0.0.0.0/0 user-defined route to the appliance, and the business wants the NAT gateway to handle internet traffic while preserving private routes to the appliance. What is the best fix?

⚠ Common exam trap

Test-takers frequently assume a NAT gateway automatically overrides a 0.0.0.0/0 UDR, but in Azure, UDRs always take precedence over system routes, so the explicit route to the NVA must be removed to allow the NAT gateway to handle internet traffic.

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

Remove the default UDR to the appliance and leave only the private-prefix routes in place.

The 0.0.0.0/0 user-defined route (UDR) to the network virtual appliance (NVA) has a higher priority than the NAT gateway's default route, so all internet-bound traffic is forced through the appliance. Removing that UDR while keeping private-prefix routes (e.g., 10.0.0.0/8) ensures that only private traffic uses the appliance, and internet traffic follows the NAT gateway's default route. This satisfies the business requirement of using the NAT gateway for internet traffic while preserving private routes through the NVA.

Answer analysis

Option-by-option breakdown

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

  • Increase the priority of the NSG rules on the subnet.

    Why it's wrong here

    Increasing NSG rule priorities only reorders permit/deny decisions at the layer-4 filter; it has no effect on the layer-3 effective route used to select the next hop. Even a broad Allow rule for outbound internet will not change the fact that the 0.0.0.0/0 UDR points to the firewall appliance, so packets are still forwarded there. Because NSGs evaluate after routing, they cannot force the NAT gateway to SNAT traffic; they only filter, not influence, the routing decision.

    When this WOULD be correct

    In a scenario where a subnet has multiple NSGs applied and the most restrictive rule is blocking desired traffic, increasing the priority of a permissive NSG rule would allow that traffic. For example, if an NSG rule with lower priority is denying RDP, raising the priority of an allow-RDP rule would fix it.

  • Remove the default UDR to the appliance and leave only the private-prefix routes in place.

    Why this is correct

    The 0.0.0.0/0 UDR is forcing all outbound traffic to the appliance, which prevents the NAT gateway from handling internet destinations. Removing that default route lets Azure use the system internet route, where the NAT gateway can provide outbound SNAT. Specific routes for private prefixes can remain and continue to send internal traffic to the appliance.

  • Associate the NAT gateway with the virtual network instead of the subnet.

    Why it's wrong here

    The Azure NAT gateway is a subnet-bound resource; there is no supported way to associate it at the virtual network scope. In the portal and Azure CLI, you must select a specific subnet when creating or attaching the gateway, so any attempt to 'associate with the VNet' would be invalid. Even if the NAT gateway were somehow applied more broadly, the explicit 0.0.0.0/0 UDR would still override its default route, because user-defined routes take precedence over system routes generated by the NAT gateway. Correcting the egress path requires removing that UDR, not relocating the NAT gateway.

    When this WOULD be correct

    In a scenario where a NAT gateway needs to provide outbound internet access for multiple subnets, and the current configuration has the NAT gateway only associated with one subnet, the correct fix would be to associate the NAT gateway with the virtual network (if supported) or create additional NAT gateways for each subnet. However, note that as of current Azure capabilities, NAT gateways are associated at the subnet level, not the virtual network level.

  • Enable service endpoints on the subnet to bypass the appliance.

    Why it's wrong here

    Implementing service endpoints on the subnet does not influence internet routing or NAT behavior. This feature injects a more specific route (e.g., for Azure Storage or SQL) that applies only to the selected Azure service, overriding the default route for those destination prefixes. Traffic bound for arbitrary public IP addresses still matches the 0.0.0.0/0 user-defined route to the appliance, so the NAT gateway remains unused. Service endpoints bypass the NVA solely for service-hosted resources, not for general internet egress.

    When this WOULD be correct

    If the question asked how to ensure traffic to Azure Storage or SQL Database from a subnet goes directly to the service without leaving the Azure network, enabling service endpoints would be correct.

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.

Remove the default UDR to the appliance and leave only the private-prefix routes in place.Correct answer

Why this is correct

The 0.0.0.0/0 UDR is forcing all outbound traffic to the appliance, which prevents the NAT gateway from handling internet destinations. Removing that default route lets Azure use the system internet route, where the NAT gateway can provide outbound SNAT. Specific routes for private prefixes can remain and continue to send internal traffic to the appliance.

Increase the priority of the NSG rules on the subnet.Wrong answer — click to see why

Why this is wrong here

NSG rules control inbound and outbound traffic at the network layer, but they do not influence routing decisions. The issue is that the 0.0.0.0/0 UDR overrides the NAT gateway's default route, so increasing NSG priority cannot redirect traffic to the NAT gateway.

★ When this WOULD be the correct answer

In a scenario where a subnet has multiple NSGs applied and the most restrictive rule is blocking desired traffic, increasing the priority of a permissive NSG rule would allow that traffic. For example, if an NSG rule with lower priority is denying RDP, raising the priority of an allow-RDP rule would fix it.

Why candidates choose this

Candidates may confuse NSG rules with routing, thinking that stricter NSG rules could force traffic through the NAT gateway, or they may overestimate the role of NSGs in controlling outbound internet paths.

Associate the NAT gateway with the virtual network instead of the subnet.Wrong answer — click to see why

Why this is wrong here

Associating a NAT gateway with the virtual network is not supported; NAT gateways must be associated with a specific subnet. This would not resolve the routing conflict where the 0.0.0.0/0 UDR to the appliance overrides the NAT gateway.

★ When this WOULD be the correct answer

In a scenario where a NAT gateway needs to provide outbound internet access for multiple subnets, and the current configuration has the NAT gateway only associated with one subnet, the correct fix would be to associate the NAT gateway with the virtual network (if supported) or create additional NAT gateways for each subnet. However, note that as of current Azure capabilities, NAT gateways are associated at the subnet level, not the virtual network level.

Why candidates choose this

Candidates may think that associating the NAT gateway at a higher scope (virtual network) would apply to all subnets, simplifying management, without realizing that Azure NAT gateways are subnet-level resources and cannot be associated with a virtual network.

Enable service endpoints on the subnet to bypass the appliance.Wrong answer — click to see why

Why this is wrong here

Service endpoints do not affect routing for outbound internet traffic; they only secure traffic to Azure services over the Azure backbone. The issue is a UDR overriding NAT gateway, not service access.

★ When this WOULD be the correct answer

If the question asked how to ensure traffic to Azure Storage or SQL Database from a subnet goes directly to the service without leaving the Azure network, enabling service endpoints would be correct.

Why candidates choose this

Candidates may confuse service endpoints with a method to bypass a network virtual appliance for internet traffic, not realizing service endpoints only apply to specific Azure services.

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

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

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.