Azure VPN Gateway Constant Intermittent loss of connection to Azure Environment

Hayden La Croix 0 Reputation points
2026-11-17T15:32:48.22+00:00

Hi all, I have configured two (2) Static Local Network Gateway VPNs from my Azure Environment Resource group to two of my on-prem SRX FWs that are situated in two different countries. I am constantly experiencing multiple network drops from my on-prem environment in location A to the Azure environment. However, location B does not experience any similar issues.

To help troubleshoot this issue, I have spun up a VM in this particular Azure resource group so I can ping the VM or do traceroutes to the VM. On occasions, when the URL is not accessible at location A, I am still able to ping the VM and other occasions I cannot ping the VM and the URL is available. There are even times one user is able to connect to the URL, ping and traceroute to the VM and other users are not.

I have ensured that that my SRX at location A is the Initiator of the traffic and the Azure Gateway VPN is the Responder.

When all other avenues of troubleshooting fails, I reset the azure gateway connection.

Is there anything else that I'm missing with regards to troubleshooting and rectifying this issue?

Azure VPN Gateway
Azure VPN Gateway

An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-11-17T15:34:30.0633333+00:00

    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, and GatewayDiagnosticLog.
    • Policy-based: only GatewayDiagnosticLog and RouteDiagnosticLog are 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:

    1. Virtual network gateway → Connections.
    2. Open each connection and note its Local Network Gateway.
    3. Open each Local Network Gateway → Configuration.
    4. 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 GatewaySubnet can 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

    1. Troubleshoot Azure VPN Gateway using diagnostic logs
    2. Azure VPN Gateway monitoring data reference
    3. Troubleshoot Azure Site-to-Site VPN disconnections
    4. Troubleshoot a Site-to-Site or Point-to-Site VPN tunnel that won't connect in Azure VPN Gateway
    5. Troubleshoot connectivity problems between Azure virtual machines
    6. Diagnose on-premises VPN connectivity with Azure
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.