Site-to-Site VPN
VPN gateway · SKUs · policy-based vs route-based · local network gateway · active-active · IPsec/IKE policy · troubleshooting · Extended Network
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Building blocks and how to implement
| Resource | What it is | Key facts |
|---|---|---|
| Virtual network | The Azure side of the connection | Its address space must not overlap the on-premises ranges. Subnets of the on-premises network can't overlap the VNet subnets you connect to. |
GatewaySubnet | Subnet that holds the gateway VMs | Must be named GatewaySubnet. A /29 works for the Basic SKU only; every other SKU needs /27 or larger. Don't deploy anything else into it. NSGs on it aren't supported. |
| Virtual network gateway (VPN) | Two or more Azure-managed VMs; gateway type Vpn | Deployment can take 45 minutes or more. The gateway region must be the VNet region. A VNet can have one VPN gateway and one ExpressRoute gateway. |
| Public IP address | One per gateway instance | New gateways must use a Standard SKU public IP. It changes only if the gateway is deleted and re-created, not on resize, reset or maintenance. |
| Local network gateway | Represents the on-premises site and its VPN device | Holds the device public IP or FQDN, the on-premises address prefixes and optional BGP settings (peer IP and ASN). One local network gateway per VPN device. |
| Connection | Links the VPN gateway to the local network gateway | Connection type IPsec (portal: Site-to-site (IPSec)). Uses a shared key that must match the device. Default IKE protocol is IKEv2. |
Steps
- Create the virtual network. Plan the address space with the on-premises administrator so nothing overlaps.
- Add the
GatewaySubnet(/27 or larger). - Create the VPN gateway: type VPN, a route-based VPN type and an AZ SKU (for example
VpnGw2AZ, Generation2) with a Standard public IP. Add a second public IP for active-active. - Create the local network gateway with the device IP (or FQDN) and the on-premises prefixes.
- Configure the VPN device with the shared key and the public IP of each gateway instance.
- Create the connection and verify that its status goes from Unknown to Connecting to Succeeded (Connected).
- Address prefixes on the local network gateway are what Azure routes to the device. Ranges must not overlap other networks you connect to. When one gateway has several connections, the address spaces can't overlap between them.
- Endpoint IP or FQDN. Use an FQDN with a Dynamic DNS name when the device has a dynamic public IP. Only one IPv4 address per FQDN is used (the first returned), IPv6 isn't supported, the gateway's DNS cache refreshes every 5 minutes, and it resolves only for disconnected tunnels. Resetting the gateway also triggers resolution.
- Changing a local network gateway that has a connection can cause tunnel disconnects and downtime. You can't switch it between an FQDN endpoint and an IP address endpoint: delete its connections, create a new local network gateway, then re-create the connections.
- Authentication is a preshared key (PSK). The FAQ says you're limited to preshared keys for authentication. The portal tutorial recommends a complex key of at least 32 characters.
- Connection mode (route-based gateways with IKEv2):
Defaultaccepts and dials whichever connects first,InitiatorOnlymeans Azure must initiate,ResponderOnlymeans the on-premises device must initiate. - BGP is optional on route-based gateways and isn't supported on the Basic SKU. If you enable it, the default ASN is 65515 (it can be changed). Azure reserves ASNs 8074, 8075, 12076, 65515, 65517, 65518, 65519 and 65520. Up to 4,000 prefixes can be advertised, and the BGP session drops if you exceed that. Advertising 0.0.0.0/0 sends all VNet egress to on-premises.
- NAT on the gateway handles overlapping on-premises and VNet ranges. It's supported on VpnGw2 to VpnGw5 and VpnGw2AZ to VpnGw5AZ, on IPsec cross-premises connections only (not VNet-to-VNet or P2S). Internet breakout and NAT64 aren't supported. Dynamic NAT is unidirectional: traffic must start from the internal-mapping side.
- Other limits. NAT-T is supported. IP fragmentation isn't supported for ESP packets or packets inside the tunnel. All tunnels on a gateway share its bandwidth and count against its tunnel limit.
Resizing, resetting or maintenance doesn't change the gateway public IP. Replacing a Basic SKU gateway (or changing policy-based to route-based) does, and then the on-premises device and any local network gateways that point at it must be updated.
Gateway SKUs for site-to-site
New gateways use the AZ SKUs, which are recommended for all new deployments and have zone-redundant options. Throughput is an aggregate benchmark and isn't guaranteed.
| SKU | S2S / VNet-to-VNet tunnels | Aggregate throughput | BGP | Zone-redundant |
|---|---|---|---|---|
| Basic (Gen1) | 10 (route-based) or 1 (policy-based) | 100 Mbps | No | No |
| VpnGw1AZ (Gen1) | 30 | 650 Mbps | Yes | Yes |
| VpnGw2AZ (Gen1 / Gen2) | 30 | 1 Gbps / 1.25 Gbps | Yes | Yes |
| VpnGw3AZ (Gen1 / Gen2) | 30 | 1.25 Gbps / 2.5 Gbps | Yes | Yes |
| VpnGw4AZ (Gen2) | 100 | 5 Gbps | Yes | Yes |
| VpnGw5AZ (Gen2) | 100 | 10 Gbps | Yes | Yes |
- More than 100 S2S tunnels: use Virtual WAN instead of VPN Gateway.
- Basic SKU is for dev-test or proof of concept, not production. It can't be created in the portal (use PowerShell or CLI), doesn't support IPv6, RADIUS, BGP, active-active, or custom IPsec/IKE policy, and doesn't reply to the health probe.
- Production workloads: every Generation1 and Generation2 SKU except Basic.
- Features of all non-Basic SKUs (route-based): up to 100 tunnels, P2S, BGP, active-active, custom IPsec/IKE policy and ExpressRoute/VPN coexistence.
- Choosing a SKU: match tunnels, throughput, features (BGP, zone redundancy) and SLA. IPsec encryption changes throughput: GCMAES256 gave the best results, DES3 with SHA256 the lowest.
- Upgrade: takes about 45 minutes with minimal downtime, and the public IP doesn't change, so the VPN device needs no change. Moving within the same tier to the AZ SKU (for example VpnGw1 to VpnGw1AZ) has no downtime. Downgrades work within the same SKU family. A Basic SKU can't be upgraded: delete the gateway and create a new one (downtime, new public IP, reconfigure the device).
- Public IP: a new gateway needs a Standard SKU public IP. For AZ SKUs the zones of the public IP decide where the instances are deployed. A Standard IP created without a zone is zone-redundant in regions that support zones.
Legacy and non-AZ SKUs are being retired, and Microsoft's pages differ on the dates. Non-AZ VpnGw1 to VpnGw5 can no longer be created (since November 1, 2025). The legacy SKUs page says Standard and High Performance SKUs will be deprecated on June 30, 2026, while the VPN Gateway FAQ says they are retired; the SKU consolidation page says the non-AZ VpnGw1 to VpnGw5 are scheduled for deprecation after September 2026. Existing non-AZ gateways no longer accept configuration changes until migrated. The Basic SKU isn't retiring.
Policy-based or route-based VPN
| Policy-based | Route-based | |
|---|---|---|
| Older name | Static routing | Dynamic routing |
| Traffic selectors | Prefix combinations from both networks | Any-to-any (wildcard); routing tables pick the tunnel |
| Supported SKU | Basic only (IKEv1) | Basic (IKEv2); VpnGw1AZ to VpnGw5AZ (IKEv1 and IKEv2) |
| Tunnels | 1 S2S tunnel | Up to 10 (Basic) or up to 100 (other SKUs) |
| P2S, BGP, active-active, VNet-to-VNet, multi-site | Not supported | Supported (BGP and active-active not on Basic) |
| Idle tunnel | Torn down after more than five minutes of no traffic, re-established when traffic flows | - |
| Created in | PowerShell or CLI only (not the portal since Oct 1, 2023) | Portal, PowerShell, CLI (default) |
- You can't convert a policy-based gateway to route-based (or the reverse). Delete the connections and the gateway, then create a new gateway. It takes about 60 minutes and the IP address changes.
- Existing policy-based gateways don't have to change unless you need a route-based feature such as point-to-site.
- A policy-based on-premises device with a route-based Azure gateway: use a custom IPsec/IKE policy with
UsePolicyBasedTrafficSelectorson the connection. The device must support IKEv2, the policy must be complete (all IKE and IPsec algorithms and SA lifetimes), and those networks can reach only the Azure VNet, not other on-premises networks or VNets through the same gateway. - IKE versions: IKEv1 is allowed on every SKU except Basic route-based. If you don't pick a type the connection uses IKEv2. You can't change IKEv1/IKEv2 after creation: delete and re-create the connection. IKEv1 tunnels can drop for up to 5 seconds at Main Mode rekey because IKEv1 has no in-place rekey; IKEv2 has it.
- VNet-to-VNet and multi-site need route-based gateways on both sides. A route-based VNet can't connect to a policy-based VNet.
High availability design
Every VPN gateway has two instances. By default they run active-standby: if the active one fails or is under maintenance, the standby takes over. Planned maintenance recovers in about 10 to 15 seconds; unplanned failures take about 1 to 3 minutes in the worst case. P2S clients are disconnected and must reconnect.
| Design | Gateway mode | Local network gateways and connections | Tunnels | Requirements |
|---|---|---|---|---|
| Default | Active-standby | - | - | - |
| Multiple on-premises devices | Active-standby | One local network gateway and one connection per device | One per device (several active tunnels) | Unique public IP per device; BGP with a unique BGP peer IP per local network gateway; same prefixes advertised; ECMP |
| Active-active gateway | Active-active | 1 and 1 (both tunnels belong to the same connection) | 2 | Two Standard static public IPs; route-based; not Basic; device must set up a tunnel to each instance |
| Dual-redundancy | Active-active on both sides | 2 and 2 | 4 (full mesh) | BGP required, as for multiple devices |
- Active-active costs the same as active-standby, but you pay for the extra public IP. A gateway with P2S enabled needs a third public IP for the P2S endpoint.
- Tunnel to both instances. If the device sets up a tunnel to only one gateway instance, the connection goes down during maintenance. If the device can't do two tunnels, use active-standby.
- Traffic flow: Azure sends traffic through both tunnels. A single TCP or UDP flow tries to stay on one tunnel from Azure, but the return path can differ: Azure doesn't guarantee symmetric routing.
- Multiple tunnels to one site count against the gateway tunnel limit, and BGP must be enabled on them. If a tunnel drops, BGP withdraws its routes and traffic moves to the remaining tunnels.
- Zone-redundant AZ SKUs protect against zone failures. Redundant VNet-to-VNet tunnels need one gateway in active-active mode.
- VPN as a failover path for ExpressRoute is a supported use of a site-to-site VPN (coexisting connections).
IPsec/IKE policy
Without a custom policy the gateway offers a default set of proposals chosen for interoperability. A custom policy is set per connection. It applies to S2S and VNet-to-VNet connections on the VPN gateway, not to ExpressRoute.
| Parameter | Allowed values or default |
|---|---|
| IKE (Phase 1, Main Mode) encryption | GCMAES256, GCMAES128, AES256, AES192, AES128 |
| IKE integrity | SHA384, SHA256, SHA1, MD5 |
| DH group (Phase 1) | DHGroup24, ECP384, ECP256, DHGroup14, DHGroup2048, DHGroup2, DHGroup1, None |
| IPsec (Phase 2, Quick Mode) encryption | GCMAES256, GCMAES192, GCMAES128, AES256, AES192, AES128, DES3, DES, None |
| IPsec integrity | GCMAES256, GCMAES192, GCMAES128, SHA256, SHA1, MD5 |
| PFS group (Phase 2) | PFS24, ECP384, ECP256, PFS2048, PFS2, PFS1, None |
| Quick Mode SA lifetime | Optional. Seconds: minimum 300, default 27,000. Kilobytes: minimum 1,024, default 102,400,000 |
| DPD timeout | 9 to 3,600 seconds, default 45 (30 to 45 recommended) |
| Traffic selector | UsePolicyBasedTrafficSelectors true or false, default false |
| IKE Main Mode SA lifetime | Fixed at 28,800 seconds |
- One policy per connection, and complete. You can't specify a partial policy: all IKE and IPsec algorithms and parameters are required. Once set, the gateway uses only that policy, as initiator and as responder.
- Device must match the IKE and IPsec algorithms, DH group, PFS group and (if used) traffic selectors. SA lifetimes are local and don't need to match.
- GCMAES: if you use GCMAES for IPsec encryption, use the same GCMAES algorithm and key length for IPsec integrity (for example GCMAES128 for both).
- SKU support: every VPN gateway SKU except Basic. The policy-based traffic selector and DPD timeout options can also be set with the Default policy, without a custom policy.
- Changing the policy can cause a disruption of a few seconds while the IKE handshake restarts. Removing the custom policy (set the connection's IPsec/IKE policy back to Default) restores the default proposals.
- VNet-to-VNet: a tunnel is two connection resources (one per direction), and both need the same policy or the tunnel won't establish.
- Shorter DPD timeouts make IKE rekey more aggressively, so the connection can appear disconnected, especially on long or lossy links.
- Default (no custom policy): IKE Main Mode uses Diffie-Hellman Group 2 (1024 bit) with a preshared key, and the route-based Quick Mode SA lifetime is 27,000 seconds.
Troubleshooting and Azure Extended Network
S2S connectivity
| Symptom or error | Cause | Fix |
|---|---|---|
| Negotiation timed out (13805) | The on-premises device isn't answering IKE messages from Azure | Check the device IP on the local network gateway, whether an on-premises firewall drops IKE packets, the device logs, and that the device supports Azure's default Phase 1 proposals |
| IKE authentication credentials unacceptable (13801) | Preshared key mismatch | Make the key on the Azure connection equal to the key on the device tunnel |
| Policy match error (13868) / No policy configured (13825) | IKE/IPsec policy mismatch | Match the custom policy (or default parameters) on the device |
| Traffic selectors unacceptable (13999) | Traffic selector mismatch | Fix the device selectors, or enable policy-based traffic selectors on the Azure connection |
| Failure in Diffie-Hellman computation (13822) | DH group mismatch | Make the DH group the same on both sides |
| Version of IKE not handled (13880) | IKE version mismatch | Use the same IKEv1 or IKEv2 on the connection and the device |
| Remote computer refused the connection (1225) | The connection is InitiatorOnly and won't accept requests from the device | Set connection mode to Default or ResponderOnly |
| Random disconnects | Perfect forward secrecy mismatch, device IP inside the local network address space, overlapping prefixes across connections, more than 200 subnet SA pairs (the gateway limit) | Match or disable PFS (set the Azure PFS group to None if the peer has none), remove the device IP from the address space, review local network gateway prefixes |
- First step: reset the Azure VPN gateway and reset the tunnel on the on-premises device. Then check the device is validated, the shared key, the peer IPs on both sides, and UDRs or NSGs on the gateway subnet.
- Reset behavior: a gateway reset reboots the gateway and reapplies the cross-premises configuration; the public IP is kept. On active-active, one instance (the primary active) reboots first; run it again to hit the same instance, or use PowerShell/CLI with the instance VIP. On active-standby, a second reset reboots the new active instance. A connection reset doesn't reboot the gateway.
- Before resetting: verify both VIPs, the same preshared key, and the same IPsec/IKE settings on both sides. A reset causes a gap in connectivity.
- Health probe: browse to
https://<gateway IP>:8081/healthprobe; for the second instance of an active-active gateway use port 8083. A response means the gateway is healthy; no response means the gateway is unhealthy or an NSG on the gateway subnet is blocking it. Basic SKU gateways don't reply. VPN gateways don't reply to ICMP on their local address. - Gateway subnet: a UDR with 0.0.0.0/0 or an NSG on the gateway subnet isn't supported. Keep BGP route propagation enabled on the gateway subnet or the gateway won't function.
- Diagnostic logs: compare TunnelDiagnosticLog (tunnel state changes) with GatewayDiagnosticLog (configuration events), using the UTC
TimeGeneratedvalues. - Policy-based gateways: the VNet address space and local subnets must match the on-premises definitions exactly, and the device must use one VPN tunnel per subnet pair.
Azure Extended Network (Windows Admin Center)
- Purpose: stretch an on-premises subnet into Azure so on-premises VMs keep their private IP addresses when they migrate. Use it only for machines that can't change IP; changing the address and using a subnet that lives wholly in Azure is better.
- How it works: a bidirectional VXLAN tunnel between two virtual appliances (one on-premises, one in Azure), one pair per extended subnet. The default UDP port is 4789.
- Limits: up to 250 IP addresses, about 700 Mbps aggregate.
- Azure prerequisites: a VNet with at least two subnets in addition to the gateway subnets, one with the same CIDR as the on-premises subnet to extend and unique in the routing domain; a virtual network gateway with a site-to-site or ExpressRoute connection; a Windows Server 2022 Azure Edition VM with nested virtualization, Hyper-V and two external virtual switches.
- On-premises prerequisites: a Windows Server 2019 or 2022 VM on a hypervisor that supports nested virtualization (highly available in a cluster is recommended), and a firewall that allows asymmetric routing.
- Deploy and manage: use the Extended network extension in Windows Admin Center connected to Azure. Deployment takes about 5 to 10 minutes. Add or remove the IPv4 addresses to extend (up to 250).
- Troubleshoot: check that the on-premises appliance is Windows Server 2019/2022 and the Azure appliance is 2022 Azure Edition, don't run Windows Admin Center on an appliance, allow UDP 4789 both ways through firewalls, use pktmon to trace packets, and check the
extnwagentservice. After setup, problems are usually firewalls or an exceeded MTU if intermittent. - Status: the Azure Extended Network extension isn't currently available on the extension feed in Windows Admin Center version 2410.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create a local network gateway | az network local-gateway create --gateway-ip-address [IP address of your on-premises VPN device] --name Site1 --resource-group TestRG1 --local-address-prefixes 10.3.0.0/16 10.0.0.0/24 | New-AzLocalNetworkGateway -Name LocalSite -ResourceGroupName testrg -Location 'West US' -GatewayIpAddress '23.99.221.164' -AddressPrefix '10.5.51.0/24' |
| Create a site-to-site connection | az network vpn-connection create --name VNet1toSite1 --resource-group TestRG1 --vnet-gateway1 VNet1GW -l eastus --shared-key abc123 --local-gateway2 Site1 | New-AzVirtualNetworkGatewayConnection -Name VNet1toSite1 -ResourceGroupName TestRG1 -Location 'East US' -VirtualNetworkGateway1 $gateway1 -LocalNetworkGateway2 $local -ConnectionType IPsec -SharedKey 'abc123' |
| Create an active-active, zone-redundant VPN gateway | az network vnet-gateway create --name VNet1GW --public-ip-addresses VNet1GWpip1 VNet1GWpip2 --resource-group TestRG1 --vnet VNet1 --gateway-type Vpn --vpn-type RouteBased --sku VpnGw2AZ --vpn-gateway-generation Generation2 --no-wait | New-AzVirtualNetworkGateway -Name VNet1GW -ResourceGroupName TestRG1 -Location "East US" -IpConfigurations $gwipconfig1,$gwipconfig2 -GatewayType "Vpn" -VpnType RouteBased -GatewaySku VpnGw2AZ -VpnGatewayGeneration Generation2 -EnableActiveActiveFeature -Debug |
| Request a zone-redundant Standard public IP for the gateway | az network public-ip create --name VNet1GWpip1 --resource-group TestRG1 --allocation-method Static --sku Standard --version IPv4 --zone 1 2 3 | New-AzPublicIpAddress -Name "VNet1GWpip1" -ResourceGroupName "TestRG1" -Location "EastUS" -AllocationMethod Static -Sku Standard -Zone 1,2,3 |
| Reset a VPN gateway | az network vnet-gateway reset -n VNet5GW -g TestRG5 | Reset-AzVirtualNetworkGateway -VirtualNetworkGateway $gw |
| Check the connection status | az network vpn-connection show --resource-group "<resource-group>" --name "<connection-name>" --query connectionStatus --output tsv | - |
| View the connection shared key | az network vpn-connection shared-key show --connection-name VNet1toSite2 --resource-group TestRG1 | Get-AzVirtualNetworkGatewayConnectionSharedKey -Name <Connection name> -ResourceGroupName <Resource group name> |
| Check the gateway SKU | az network vnet-gateway show --name "vpn-gateway" --resource-group "test-rg" --query "sku.name" | (Get-AzVirtualNetworkGateway -Name "vpn-gateway" -ResourceGroupName "test-rg").Sku.Name |
| Show the PFS group of a connection's IPsec policy | az network vpn-connection ipsec-policy list --resource-group "<resource-group>" --connection-name "<connection-name>" --query "[].pfsGroup" --output tsv | - |
| Create a custom IPsec/IKE policy object | - | $ipsecpolicy6 = New-AzIpsecPolicy -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup24 -IpsecEncryption AES256 -IpsecIntegrity SHA256 -PfsGroup None -SALifeTimeSeconds 14400 -SADataSizeKilobytes 102400000 |
| Update the on-premises prefixes of a local network gateway that has a connection (downtime) | az network local-gateway update --local-address-prefixes 10.0.0.0/24 10.3.0.0/16 10.5.0.0/16 10.6.0.0/16 --name VNet1toSite2 -g TestRG1 | - |
| Check that the Extended Network agent runs (on each appliance) | - | get-service extnwagent |
Exam Tips
Tick each tip once you can answer it without looking.
“Gateway creation fails or the VPN gateway stops working after a security team adds an NSG” → NSGs on GatewaySubnet aren't supported. Remove the NSG (and any 0.0.0.0/0 UDR) from the gateway subnet.. Trap: Adding rules for UDP 500/4500 to the NSG doesn't make an NSG on the gateway subnet supported.
“Minimum gateway subnet size” → /27 or larger for every SKU except Basic (Basic can use /29). Name it exactly GatewaySubnet.. Trap: /29 only works for the Basic SKU; any other name makes the gateway deployment fail.
“Which resource holds the on-premises device IP and address prefixes?” → The local network gateway.. Trap: The virtual network gateway is the Azure side. The connection holds the shared key.
“On-premises device has a dynamic public IP” → Give the local network gateway an FQDN (Dynamic DNS) as the endpoint. The gateway re-resolves it for disconnected tunnels every 5 minutes.. Trap: You can't convert a local network gateway between IP and FQDN endpoints later; you must create a new one and re-create the connections.
“Policy-based gateway must support point-to-site, BGP or more than one tunnel” → Delete it and create a route-based gateway. A policy-based gateway can't be converted.. Trap: Resizing or a SKU upgrade doesn't change the VPN type. The Basic SKU can't be upgraded at all.
“Connect to an on-premises policy-based firewall from a route-based Azure gateway” → Custom IPsec/IKE policy with UsePolicyBasedTrafficSelectors on the connection (device must support IKEv2).. Trap: Those networks can only reach the Azure VNet; they can't transit through the gateway to other sites or VNets.
“Highest availability for S2S” → Active-active Azure gateway plus two on-premises devices: 2 local network gateways, 2 connections, 4 tunnels, BGP.. Trap: Active-active with a single device that tunnels to only one instance still drops during maintenance.
“Several on-premises devices to the same Azure gateway” → One local network gateway and one connection per device, unique device public IPs and BGP peer IPs, BGP and ECMP.. Trap: The gateway is still active-standby in this design, so the brief failover still happens.
“Active-active gateway requirements and cost” → Route-based, not Basic, two Standard static public IPs (a third if P2S is enabled). The gateway costs the same as active-standby; the extra public IPs are billed.. Trap: Basic and policy-based gateways can't be active-active.
“More than 100 S2S tunnels needed” → Use Virtual WAN. VpnGw4AZ and VpnGw5AZ top out at 100 tunnels.. Trap: No VPN gateway SKU supports more than 100 tunnels.
“Upgrade a Basic SKU to VpnGw2AZ” → Not possible in place. Delete and re-create (downtime, new public IP, update device and P2S clients).. Trap: An in-place upgrade (same public IP, no device change) applies only to SKUs that support it, such as Gen2 to a Gen2 AZ SKU.
“Custom IPsec/IKE policy rules” → One policy per connection, all algorithms specified, any SKU except Basic. SA lifetimes needn't match the device; the rest must.. Trap: Partial policies aren't allowed, and ExpressRoute connections don't use it.
“VNet-to-VNet with custom IPsec/IKE policy won't connect” → Both connection resources (one per direction) must carry the same policy.. Trap: Setting it on only one direction leaves the tunnel unestablished.
“Error 13801 / IKE authentication credentials unacceptable” → Preshared key mismatch between the Azure connection and the device.. Trap: Policy mismatch shows 13868/13825; traffic selector mismatch shows 13999.
“Error 1225 remote computer refused the connection” → Connection mode is InitiatorOnly. Set it to Default or ResponderOnly.. Trap: A wrong shared key shows as 13801 (IKE authentication credentials unacceptable), not 1225.
“Tunnel drops randomly; device has PFS enabled” → Match or disable PFS: set the Azure PFS group to None if the peer has none (apply the full policy).. Trap: Resetting the gateway is the generic first step but it doesn't change the PFS group; the Azure policy has to match the device.
“Check whether the gateway is healthy” → Browse to the gateway IP on port 8081 /healthprobe (8083 for the second active-active IP).. Trap: ICMP ping doesn't work (no reply on the local address), and Basic SKU gateways don't answer the probe.
“On-premises subnet must keep its IP addresses in Azure” → Azure Extended Network: Windows Admin Center, VXLAN between two Windows Server appliances, up to 250 IPs, UDP 4789.. Trap: It isn't a VPN Gateway feature, it needs a gateway connection (S2S or ExpressRoute) underneath, and Azure's appliance must be Windows Server 2022 Azure Edition.
Sources
- About Azure VPN Gateway
- About gateway SKUs
- VPN Gateway configuration settings
- VPN Gateway SKU consolidation and migration
- Upgrade a VPN Gateway SKU
- VPN Gateway legacy SKUs
- Tutorial: create a site-to-site VPN connection (portal)
- Site-to-site VPN: Azure CLI
- Site-to-site VPN: PowerShell
- Create a route-based VPN gateway: Azure CLI
- Create an active-active VPN gateway: PowerShell
- Modify a local network gateway (portal)
- Design highly available gateway connectivity
- About active-active VPN gateways
- Cryptographic requirements and IPsec/IKE policy
- Configure custom IPsec/IKE policies (portal)
- About VPN devices and default IPsec/IKE parameters
- Connect to multiple on-premises policy-based VPN devices
- About BGP with VPN Gateway
- Reliability in Azure virtual network gateways (zone redundancy)
- About NAT on VPN Gateway
- Reset a VPN gateway or connection
- Troubleshoot an S2S VPN that can't connect
- Troubleshoot S2S issues using error codes
- Troubleshoot S2S disconnections
- Azure VPN Gateway FAQ
- Extended network for Azure (Windows Admin Center)
Checked against Microsoft Learn on November 13, 2026.