Hi @GAWAI, SRIKANT,
Thank you for reaching out on Microsoft Q&A forum.
I understand your issue regarding routing on-premises traffic to the Internet through Azure Firewall over ExpressRoute.
You attempt to create a user-defined route (UDR) on the GatewaySubnet with a destination of 0.0.0.0/0 pointing to Azure Firewall failed with "Cannot associate the default route 0.0.0.0/0 to GatewaySubnet." error and this behavior is expected due to Azure’s restrictions on GatewaySubnet configuration.
From the official documentation (Azure VPN Gateway Settings):
So, applying a default route (0.0.0.0/0) to the GatewaySubnet would prevent the gateway from communicating with its management infrastructure.Any route overlapping the GatewaySubnet or gateway IP ranges is blocked.This restriction ensures proper operation of the gateway, BGP, and diagnostic functions.
To route on-premises traffic to the Internet via Azure Firewall:
1.Keep GatewaySubnet untouched
- Do not assign UDRs with 0.0.0.0/0 or NSGs that block traffic.
2.Use Hub-Spoke topology with UDRs
- Place Azure Firewall in a dedicated subnet (e.g.,
AzureFirewallSubnet) in the Hub VNet.
- Apply UDRs to other subnets (spoke VNets or on-prem routes via BGP) with next-hop set to Azure Firewall private IP.
3.Enable BGP route propagation on the GatewaySubnet
- This allows the gateway to advertise the forced-tunneling routes to on-premises without breaking gateway functionality.
4.Azure Firewall handles outbound NAT
- All traffic routed through the firewall will be NAT’d to the Internet, and return traffic flows correctly back to on-premises.
Refer- Forced tunneling with Azure Firewall
Kindly let us know if the above helps or you need further assistance on this issue.
If the answer is helpful, please 'Accept the answer' and kindly upvote it. If you have extra questions about this answer, please click "Comment".