An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
Capture the affected connection’s status, counter deltas, and VPN diagnostic logs during the next incident before resetting it, because the mixed ping, URL, and per-user results do not yet establish that the Site-to-Site tunnel itself is dropping.
1. Determine whether the tunnel or only a particular flow is failing
First check the gateway VPN type on Virtual network gateway → Overview. This affects which logs are available:
- Route-based: use
TunnelDiagnosticLog,IKEDiagnosticLog,RouteDiagnosticLog, andGatewayDiagnosticLog. - Policy-based: only
GatewayDiagnosticLogandRouteDiagnosticLogare available.^1^
During a failure, run this repeatedly while generating controlled traffic from location A:
az network vpn-connection show \
--resource-group "<resource-group>" \
--name "<location-A-connection>" \
--query "{status:connectionStatus,in:ingressBytesTransferred,out:egressBytesTransferred}" \
--output json
Interpret the change in counters, not merely their absolute values; they are cumulative and can include unrelated traffic:
- Not connected: investigate IKE/IPsec or peer reachability.
- Connected, but no counter delta during controlled traffic: investigate routing, selectors, or the SRX.
- Connected with counter deltas: the tunnel is carrying some traffic; test the affected destination IP and TCP port rather than using ICMP alone.
Also chart these Azure Monitor metrics, filtered by the location-A ConnectionName and RemoteIP:
- Tunnel ingress/egress bytes
- Tunnel ingress/egress packet drops
- Tunnel ingress/egress traffic-selector mismatch drops
These metrics can distinguish a whole-tunnel outage from packet drops or selector mismatches.^2^
2. Correlate Azure and SRX events at the same UTC timestamp
Enable diagnostic settings to send the available VPN Gateway log categories to Log Analytics. For a route-based gateway, start with:
AzureDiagnostics
| where Category == "TunnelDiagnosticLog"
| where remoteIP_s == "<location-A-SRX-public-IP>"
| project TimeGenerated, OperationName, remoteIP_s, instance_s
| sort by TimeGenerated asc
Then inspect IKEDiagnosticLog around each TunnelDisconnected timestamp. The documented interpretations include:
- Disconnect and reconnect on a different gateway instance within seconds: gateway failover.
- Disconnect and reconnect on the same instance: possible network interruption, DPD timeout, or disconnect initiated by the on-premises device.
- Authentication, policy, PFS, or proposal errors: align the corresponding SRX and Azure IPsec settings.^1^
Compare those timestamps with the SRX IKE, IPsec-SA, DPD, routing, session, and interface logs. Also compare with Azure Service Health after identifying the exact disconnect time.^3^
3. Check the two-site configuration for route ambiguity
Because two static Local Network Gateways use the same Azure gateway, compare their configured prefixes:
- Virtual network gateway → Connections.
- Open each connection and note its Local Network Gateway.
- Open each Local Network Gateway → Configuration.
- Compare every Address space prefix.
Identical or overlapping prefixes can intermittently select the unintended connection. Correct prefixes assigned to the wrong site. If the sites intentionally use overlapping networks, separate nonoverlapping NAT mappings are required where supported.^3^
Also verify that location A’s SRX public external IP is not included in that Local Network Gateway’s address-space prefixes; Microsoft documents this as a cause of sporadic disconnections.^3^
4. Inspect GatewaySubnet and workload routing separately
Check VNet → Subnets → GatewaySubnet for an attached route table or NSG:
- Correct any UDR that redirects or blackholes the SRX peer IP or
0.0.0.0/0. - Correct deny rules affecting the peer or UDP 500/4500.
- An NSG on
GatewaySubnetcan cause the gateway to stop functioning as expected.^4^
Separately inspect the target VM NIC’s Effective routes and Effective security rules. Confirm location A’s prefixes use the virtual network gateway and that the application port is permitted.^5^
If the gateway is policy-based, also check:
- One tunnel per subnet pair on the SRX.
- The 200 subnet-SA-pair limit.
- Matching Phase 2/PFS settings.^3^
5. Separate URL, DNS, and application failures from VPN failures
When the URL fails but the VM still answers ping:
- Resolve the URL from affected and unaffected users and compare returned IPs.
- Test the actual TCP destination and port.
- Check proxy, load balancer, application, and server logs.
- Capture packets and SRX sessions for one affected and one unaffected user.
Network Watcher → Connection troubleshoot uses an Azure source resource, so it validates the Azure-originated/reverse path; it does not reproduce the users’ on-premises-to-Azure flow. Use client/SRX captures for that direction.^6^
Reserve a gateway reset for a gateway stuck in Failed or when diagnostics identify stale gateway state. It briefly drops every tunnel and changes the live condition being investigated, although previously retained logs remain available.^4^
References
- Troubleshoot Azure VPN Gateway using diagnostic logs
- Azure VPN Gateway monitoring data reference
- Troubleshoot Azure Site-to-Site VPN disconnections
- Troubleshoot a Site-to-Site or Point-to-Site VPN tunnel that won't connect in Azure VPN Gateway
- Troubleshoot connectivity problems between Azure virtual machines
- Diagnose on-premises VPN connectivity with Azure