AZ-104 Implement and Manage Virtual Networking Practice Question
A subnet is associated with a NAT gateway, but outbound traffic from the VMs still leaves through a network virtual appliance because the subnet has a user-defined route for 0.0.0.0/0 with next hop type Virtual appliance. The workload must use the NAT gateway for internet-bound traffic while keeping more specific routes intact. What should the administrator change?
⚠ Common exam trap
Test-takers frequently think a NAT gateway requires a UDR to function, when in fact the NAT gateway works via the system default route and a UDR for 0.0.0.0/0 with a different next hop type will override it, breaking the NAT gateway's intended behavior.
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 0.0.0.0/0 user-defined route from the subnet route table.
The NAT gateway is designed to provide outbound connectivity for VMs in the subnet, but a user-defined route (UDR) for 0.0.0.0/0 with next hop type Virtual appliance overrides the default route to the NAT gateway. By removing that UDR, the subnet's default route reverts to the system route, which directs internet-bound traffic to the NAT gateway's public IP. More specific routes (e.g., to on-premises networks) remain intact because they are not affected by the removal of the 0.0.0.0/0 route.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Disable the subnet's network security group so the NAT gateway can take effect.
Why it's wrong here
Network security group (NSG) rules are stateful packet filtering policies applied at the subnet or NIC boundary; they do not participate in route table lookup or next-hop selection. Disabling or removing the NSG would not alter the effective route for 0.0.0.0/0, which remains the user-defined route (UDR) sending traffic to the virtual appliance. Even with the NSG removed, outbound packets would still be forwarded to the virtual appliance's IP, so the NAT gateway would never become the egress path. Additionally, removing the NSG could expose the workload to unwanted inbound traffic without addressing the actual route precedence problem.
When this WOULD be correct
If a subnet's NSG is blocking outbound traffic that should be allowed through a NAT gateway, and the routing is correctly configured to use the NAT gateway, then disabling or modifying the NSG rules could resolve connectivity issues.
- ✓
Remove the 0.0.0.0/0 user-defined route from the subnet route table.
Why this is correct
A default UDR to a virtual appliance overrides the system default route, so the NAT gateway never becomes the effective internet egress path. Removing that default route restores normal outbound routing, and the NAT gateway can then provide the public source IP for internet-bound traffic. More specific UDRs for private prefixes can remain in place.
- ✗
Enable gateway route propagation on the route table.
Why it's wrong here
Enabling gateway route propagation on the route table only permits routes learned from a virtual network gateway (VPN or ExpressRoute) to be added to the table. Those propagated routes are typically BGP-learned prefixes for on-premises networks, and they neither create a route to the NAT gateway nor override an existing user-defined 0.0.0.0/0 route. Azure's route priority places user-defined routes above BGP-propagated routes for the same prefix, so the existing UDR to the virtual appliance would still be preferred. Furthermore, if no virtual network gateway is configured, there are no propagated routes at all, so this action has no effect on the subnet's outbound connectivity.
When this WOULD be correct
In a scenario where a subnet needs to learn on-premises routes via a VPN gateway or ExpressRoute, and the route table does not have a conflicting 0.0.0.0/0 UDR, enabling gateway route propagation would allow those routes to be added automatically.
- ✗
Attach a public IP address to each virtual machine NIC.
Why it's wrong here
Attaching a public IP address to each VM NIC gives each virtual machine its own public address for outbound source network address translation (SNAT), but it does not change the subnet's route table or route precedence. The 0.0.0.0/0 UDR to the virtual appliance still overrides the system default route, so traffic intended for the internet will be forwarded to the appliance rather than directly egressing via the NAT gateway or the NIC's public IP. This approach also bypasses the centralized NAT gateway design, increases public IP management overhead, and fails to fix the fundamental issue that a more specific (or same-prefix) user-defined route is winning over the NAT gateway's default internet route.
When this WOULD be correct
In a scenario where a VM needs direct outbound internet access without going through a NAT gateway or virtual appliance, and the subnet has no conflicting routes, attaching a public IP to the NIC would be correct. For example, if the requirement is to allow a specific VM to have its own public IP for inbound connections while other VMs use a NAT gateway.
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 0.0.0.0/0 user-defined route from the subnet route table.Correct answer▾
Why this is correct
A default UDR to a virtual appliance overrides the system default route, so the NAT gateway never becomes the effective internet egress path. Removing that default route restores normal outbound routing, and the NAT gateway can then provide the public source IP for internet-bound traffic. More specific UDRs for private prefixes can remain in place.
✗Disable the subnet's network security group so the NAT gateway can take effect.Wrong answer — click to see why▾
Why this is wrong here
Disabling the network security group does not affect routing; the NAT gateway is bypassed because the 0.0.0.0/0 UDR with next hop Virtual Appliance overrides the default route to the NAT gateway. NSGs control traffic filtering, not routing.
★ When this WOULD be the correct answer
If a subnet's NSG is blocking outbound traffic that should be allowed through a NAT gateway, and the routing is correctly configured to use the NAT gateway, then disabling or modifying the NSG rules could resolve connectivity issues.
Why candidates choose this
Candidates may confuse the roles of NSGs and route tables, thinking that NSGs can override routing decisions or that disabling security will force traffic through the NAT gateway.
✗Enable gateway route propagation on the route table.Wrong answer — click to see why▾
Why this is wrong here
Enabling gateway route propagation adds routes from a VPN gateway or ExpressRoute to the route table, but it does not override the existing 0.0.0.0/0 UDR. The NAT gateway still cannot take effect because the UDR with next hop Virtual appliance remains the preferred route for internet-bound traffic.
★ When this WOULD be the correct answer
In a scenario where a subnet needs to learn on-premises routes via a VPN gateway or ExpressRoute, and the route table does not have a conflicting 0.0.0.0/0 UDR, enabling gateway route propagation would allow those routes to be added automatically.
Why candidates choose this
Candidates may think that enabling route propagation will allow the NAT gateway's default route to be learned or that it will override the UDR, misunderstanding that gateway propagation only adds routes from a gateway and does not remove existing UDRs.
✗Attach a public IP address to each virtual machine NIC.Wrong answer — click to see why▾
Why this is wrong here
Attaching a public IP to each VM NIC would bypass the NAT gateway and the network virtual appliance, but the requirement is to use the NAT gateway for internet-bound traffic while keeping more specific routes intact. This option does not address the conflicting 0.0.0.0/0 route that directs traffic to the virtual appliance.
★ When this WOULD be the correct answer
In a scenario where a VM needs direct outbound internet access without going through a NAT gateway or virtual appliance, and the subnet has no conflicting routes, attaching a public IP to the NIC would be correct. For example, if the requirement is to allow a specific VM to have its own public IP for inbound connections while other VMs use a NAT gateway.
Why candidates choose this
Candidates may think that giving each VM a public IP is a straightforward way to enable outbound internet access, overlooking that the existing route table still overrides the NAT gateway and that the question explicitly requires using the NAT gateway.
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
VPN Gateway and ExpressRoute
Key term
NAT
NAT (Network Address Translation) is a method that allows multiple devices on a private network to share a single public IP address when accessing the internet.
Key term
UDR
UDR is a user-defined routing rule that controls how network traffic moves between subnets or to external destinations in a cloud or on-premises environment.
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 a NAT gateway attached, but outbound internet traffic from the VMs is still leaving through a network virtual appliance. The subnet's route table includes a user-defined route for 0.0.0.0/0 with the next hop set to Virtual appliance. The business wants internet traffic to use the NAT gateway while keeping any required specific routes to on-premises networks. What should the administrator do?
medium- A.Keep the default route and add a second NAT gateway to the subnet.
- ✓ B.Remove the 0.0.0.0/0 user-defined route and keep only specific routes for private prefixes.
- C.Disable network security groups on the subnet so the NAT gateway becomes active.
- D.Set gateway route propagation to Disabled so the NAT gateway is preferred.
Why B: The user-defined route (UDR) for 0.0.0.0/0 with next hop Virtual appliance is overriding the NAT gateway's default route. NAT gateways require a default route (0.0.0.0/0) with next hop 'Internet' to direct outbound traffic through them. By removing the conflicting UDR and keeping only specific routes for on-premises prefixes, the subnet will use the NAT gateway for internet traffic while maintaining connectivity to on-premises networks via the remaining UDRs.
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.