Can You Use UDR Rules with Vnets That Have Gateway Transit in Azure?

May 7, 2025 2 answers
Asked by CuriousNomad123
I'm working with Azure and trying to figure out if I can apply User Defined Route (UDR) rules to a virtual network (VNet) that uses gateway transit. My goal is to direct traffic from on-premises to a firewall in Azure, but it's not working as expected. So far, everything runs smoothly when not using UDR rules, especially since these VNets are linked through peerings and configured with gateway transit. However, as soon as I attempt to implement UDR rules to reroute traffic through the gateway transit, things stop functioning. Does anyone know if it's actually possible to use UDRs in this setup?

Answers

TechWhizKid
Absolutely, but you've got to dig into the MSFT docs because itโ€™s not super straightforward. Just to clarify, UDRs allow routing control between subnets and VNets, but when dealing with traffic through a gateway transit, there are some limitations. You canโ€™t redirect gateway transit traffic that's coming from a peered VNet to the internet or on-premises using UDRs. They can help manage traffic within a VNet or to NVA appliances, but not for the gateway transit traffic specifically.
Reply to this answer
AzureGuru42
Yes, you can use UDRs, but it's a bit more complex than just applying them. From what you've described, it sounds like you might be facing asymmetric traffic issues. Essentially, the subnet you're targeting needs to be able to return traffic using the same route. This might mean you need to adjust your return routes accordingly. Check out the Microsoft documentation, it can provide some insight into how Azure selects routes for traffic.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions