Intermittent connectivity and RDP disconnects across site-to-site VPN

Jeff Chase 0 Reputation points
2026-07-22T22:20:07.1166667+00:00

We are troubleshooting intermittent Remote Desktop disconnects between an on-premises office and a Windows Server 2022 Datacenter VM in Azure.

Environment:

  • Windows Server 2022 VM running Remote Desktop Session Host in Azure

Site-to-site IPsec VPN between a Sophos XGS firewall and an Azure VPN Gateway

Main-office client subnet: 192.168.0.0/24

Additional remote offices connect to the Sophos firewall through Sophos RED devices

RDS licensing is configured for Per User and RD Licensing Diagnoser reports no licensing problems

The main office recently upgraded to a 1 Gbps fiber Internet connection

Some Azure firewall/security and routing configuration was changed previously to improve security

Symptoms:

Multiple users at the main office sometimes lose their RDP sessions at approximately the same time. The sessions normally reconnect afterward. During at least one occurrence, a user reported that regular Internet connectivity also failed.

The RDS event logs contain network-related disconnects, including:

0x80070079 — The semaphore timeout period has expired

0x80070040 — The specified network name is no longer available

The server logs show sessions disconnecting and reconnecting rather than being logged off. RD Licensing Diagnoser reports no problems.

Troubleshooting completed:

Replaced the Ethernet patch cable between the Sophos firewall and the main switch

Confirmed the firewall and switch ports negotiate at 1 Gbps full duplex

Restarted the firewall and main switch

Continuous ping tests have shown very little packet loss, although one-second pings may not capture a brief interruption

Configured the RDS Session Host policy “Select RDP transport protocols” to “Use only TCP” to rule out problems with RDP over UDP

Verified through Group Policy Results that the TCP-only policy is applied

The problem has continued

We are collecting additional simultaneous ping results to the firewall LAN interface, Internet, Azure VM, and remote-site addresses

Questions:

Which Azure VPN Gateway diagnostic logs and metrics should we enable to identify brief tunnel resets, IPsec renegotiations, packet loss, or routing changes?

Could an Azure Firewall, NSG, route table/UDR, or asymmetric return path cause established RDP sessions to disconnect intermittently while reconnecting shortly afterward?

What is the recommended MTU and TCP MSS configuration for a Sophos-to-Azure site-to-site IPsec VPN?

Should the Azure VPN Gateway connection use any particular DPD, IKE/IPsec, or connection-mode settings with a Sophos XGS firewall?

What should we check in Network Watcher, Effective Routes, Next Hop, Connection Monitor, or VPN Troubleshoot?

Are there specific Azure VPN Gateway metrics that can be correlated with the exact disconnect times?

We would appreciate guidance on determining whether these interruptions originate with the Azure VPN Gateway, Azure routing/firewall configuration, or the on-premises connection.We are troubleshooting intermittent Remote Desktop disconnects between an on-premises office and a Windows Server 2022 Datacenter VM in Azure.

Environment:

Windows Server 2022 VM running Remote Desktop Session Host in Azure

Site-to-site IPsec VPN between a Sophos XGS firewall and an Azure VPN Gateway

Main-office client subnet: 192.168.0.0/24

Additional remote offices connect to the Sophos firewall through Sophos RED devices

RDS licensing is configured for Per User and RD Licensing Diagnoser reports no licensing problems

The main office recently upgraded to a 1 Gbps fiber Internet connection

Some Azure firewall/security and routing configuration was changed previously to improve security

Symptoms:

Multiple users at the main office sometimes lose their RDP sessions at approximately the same time. The sessions normally reconnect afterward. During at least one occurrence, a user reported that regular Internet connectivity also failed.

The RDS event logs contain network-related disconnects, including:

0x80070079 — The semaphore timeout period has expired

0x80070040 — The specified network name is no longer available

The server logs show sessions disconnecting and reconnecting rather than being logged off. RD Licensing Diagnoser reports no problems.

Troubleshooting completed:

Replaced the Ethernet patch cable between the Sophos firewall and the main switch

Confirmed the firewall and switch ports negotiate at 1 Gbps full duplex

Restarted the firewall and main switch

Continuous ping tests have shown very little packet loss, although one-second pings may not capture a brief interruption

Configured the RDS Session Host policy “Select RDP transport protocols” to “Use only TCP” to rule out problems with RDP over UDP

Verified through Group Policy Results that the TCP-only policy is applied

The problem has continued

We are collecting additional simultaneous ping results to the firewall LAN interface, Internet, Azure VM, and remote-site addresses

Questions:

Which Azure VPN Gateway diagnostic logs and metrics should we enable to identify brief tunnel resets, IPsec renegotiations, packet loss, or routing changes?

Could an Azure Firewall, NSG, route table/UDR, or asymmetric return path cause established RDP sessions to disconnect intermittently while reconnecting shortly afterward?

What is the recommended MTU and TCP MSS configuration for a Sophos-to-Azure site-to-site IPsec VPN?

Should the Azure VPN Gateway connection use any particular DPD, IKE/IPsec, or connection-mode settings with a Sophos XGS firewall?

What should we check in Network Watcher, Effective Routes, Next Hop, Connection Monitor, or VPN Troubleshoot?

Are there specific Azure VPN Gateway metrics that can be correlated with the exact disconnect times?

We would appreciate guidance on determining whether these interruptions originate with the Azure VPN Gateway, Azure routing/firewall configuration, or the on-premises connection.

Azure Virtual Network
Azure Virtual Network

An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.


1 answer

Sort by: Most helpful
  1. Christos Panagiotidis 3,546 Reputation points
    2026-07-23T06:40:28.2466667+00:00

    Correlate one incident to an exact UTC time. Enable VPN Gateway resource logs for GatewayDiagnosticLog, TunnelDiagnosticLog, RouteDiagnosticLog, and IKEDiagnosticLog, sending them to Log Analytics. A TunnelDisconnected event followed by reconnection on the same gateway instance points toward DPD, the on-premises device, or the WAN path; a different instance can indicate Azure failover or maintenance. Run Connection Monitor with TCP 3389 from an Arc-enabled on-premises host to the VM, alongside tests to the Sophos gateway and an Internet target, so simultaneous loss identifies the failing segment. Check Effective Routes, Network Watcher Next Hop and IP Flow Verify, plus NSG and firewall flow logs for asymmetric routing. Avoid arbitrary MTU changes: Azure VPN Gateway clamps IPv4 TCP MSS to 1360 bytes over the Internet. Match the Sophos IKE/IPsec policy to Azure-supported parameters. If Azure logs show a gateway event, open Support with timestamps and diagnostic records; otherwise involve the ISP or Sophos.

    Was this answer helpful?

    0 comments No comments

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.