An Azure service that delivers high availability and network performance to applications.
Hello @ Chao, Oliver,
Thank for reaching out to Microsoft Q&A.
You’re right that if you front your NVAs with an Azure Standard Load Balancer (internal or public) and rely on its outbound rules, you’ll see SNAT applied, which replaces the original source IP. That SNAT behavior is baked into the load-balancing data path and blocks transparent east–west inspection.
What you want instead is the VXLAN-based pass-through that Gateway Load Balancer (GWLB) offers, because it preserves the client’s original source IP. Here’s how to get there:
Chain GWLB to your VMs’ NICs —not to a Standard Load Balancer front end
• In the GWLB overview docs you’ll see that you can “chain” the Gateway Load Balancer to a Standard NIC IP configuration. That means any traffic hitting the VM NIC is automatically steered through the GWLB + your NVA pool, and it returns with the original source IP intact.
• If you chain via a Standard Load Balancer instead, Azure applies SNAT on egress, so your NVAs only ever see the LB’s SNAT port, not the actual VM source IP.
Use UDRs (user-defined routes) for east–west flows
• In each subnet that hosts VMs you want inspected, add a 0.0.0.0/0 (or just your VNet CIDR) route pointing at the GWLB frontend as the next hop. That forces all cross-subnet traffic onto the GWLB chain.
• Because GWLB is a pass-through device, it VXLAN-encapsulates, sends to your NVAs, decapsulates, and returns to the VM—again preserving original source IPs.
Skip any outbound rules on a Standard Load Balancer
• If you also need north–south inspection, put your public traffic through GWLB in the same way—chain the public-facing Standard LB or NIC to the GWLB, not via any outbound rules that do SNAT.
• For purely internal traffic, you don’t need an Azure Load Balancer at all—you can just chain the GWLB to each NIC and rely on your UDRs.
Double-check NVA and VM settings
• Make sure IP forwarding is enabled on the NICs of your NVAs. • Verify the GWLB backend pool health probes are green.
• No NSG/UDR should break the return path—both directions must flow via the GWLB.
References
- Gateway Load Balancer overview (chaining & source-IP preservation): https://learn.microsoft.com/azure/load-balancer/gateway-overview#configuration-and-supported-scenarios
- Azure Load Balancer outbound rules & SNAT behavior: https://docs.microsoft.com/azure/load-balancer/load-balancer-outbound-connections#snatporttable
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".