Azure VPN Gateway
Azure VPN Gateway is a managed service that creates encrypted IPsec and IKE tunnels over the public internet between a virtual network and an on-premises network or another virtual network. It is the quicker and cheaper alternative to ExpressRoute.
Azure VPN Gateway
VPN Gateway supports site-to-site tunnels to offices or datacenters, point-to-site connections for individual remote users, and VNet-to-VNet links. It lives in a subnet that must be named GatewaySubnet. Deployment typically takes 30 to 45 minutes, which is much faster than provisioning a dedicated circuit.
How Do VPN Gateway and ExpressRoute Compare?
| Aspect | VPN Gateway | ExpressRoute |
|---|---|---|
| Path | Encrypted over the internet | Private provider circuit |
| Setup time | Hours | Weeks |
| Performance | Variable latency and jitter | Predictable, SLA-backed |
How Do You Create One?
az network vnet-gateway create --name office-vpngw \ --resource-group mumbai-staging-rg --vnet mumbai-staging-vnet \ --public-ip-addresses vpngw-pip --gateway-type Vpn \ --vpn-type RouteBased --sku VpnGw1AZWhy It Matters in Production
A fintech like CRED can connect its staging network to the office over a site-to-site VPN, because staging traffic does not need a dedicated circuit and the setup cost is low. Production traffic with strict latency needs belongs on ExpressRoute.
Common MistakeSizing the gateway by your ISP speed. Each SKU has its own throughput ceiling, so an undersized gateway looks like an ISP problem at peak hours, and resizing to a larger SKU in the same family may cause brief downtime.
TipUse an active-active, zone-redundant gateway (AZ SKUs) with two on-premises devices for resilience, and a policy-free route-based VPN type for flexibility.
Frequently Asked Questions
Does VPN Gateway encrypt traffic?
Yes. Traffic is encrypted with IPsec and IKE, although it still travels over the public internet.
When should I choose ExpressRoute instead?
Choose ExpressRoute for predictable latency, high bandwidth, or rules that forbid internet-routed traffic. VPN also works well as a backup path for an ExpressRoute circuit.
Why is the subnet called GatewaySubnet?
Azure requires that exact name for the gateway's subnet, and it should hold only gateway resources, with a /27 or larger range recommended.