Description |
This article describes the common causes of IPSec VPN disconnection issues and provides a systematic approach to troubleshooting intermittent disconnections in FortiGate IPSec VPN deployments. |
Scope | FortiGate Firewalls. |
Solution |
IPSec Protocol Basics. IPSec VPN tunnels maintain their connection status through several underlying mechanisms. Understanding these mechanisms is crucial for properly diagnosing disconnection issues.
IPSec VPN consists of two main phases:
Both phases have lifetimes, after which renegotiation is required. Improper handling of this renegotiation process can result in disconnections from the tunnel.
Common Causes of IPSec VPN Disconnections. Dead Peer Detection (DPD). DPD is a mechanism that detects when a VPN peer is no longer responsive. When a tunnel becomes idle (no traffic passing through), DPD begins sending "Are You There?" probes to verify if the peer is still active.
How DPD Works:
Impact on Disconnections:
For more information on DPD configuration and troubleshooting, review the following KB article: Technical Tip: Configuring DPD (dead peer detection) on IPsec VPN
Keepalive Mechanisms. Keepalive messages maintain the tunnel's active state by generating periodic traffic. Unlike DPD, which checks if a peer is alive, keepalives prevent the tunnel from going idle. Without keepalives, a tunnel that experiences no user traffic may be susceptible to disconnection due to DPD or other timeout mechanisms. The following is a snapshot of the configuration relevant for the keepalive.
config vpn ipsec phase2-interface edit "phase2-name" set keepalive enable next end
IP Protocol Issues (IPv4/IPv6). A common but often overlooked cause of disconnection is the presence of dual IP protocol stacks. When a client has both IPv4 and IPv6 enabled but the VPN is configured primarily for IPv4, protocol conflicts can occur.
This can manifest as:
To verify if this is causing issues, the following article can help. Technical Tip: FortiClient IPsec dialup tunnel keep disconnecting
Network Path Issues. Network path problems are often the root cause of intermittent disconnections, especially when they only affect specific users or locations.
Common network path issues include:
These issues need to be reviewed with the ISP, as these fall outside the IPsec peers.
Traffic Idle Timeouts. Many network devices maintain connection state tables and will remove entries for connections that remain idle for too long. When this happens, the tunnel may appear to be up but cannot pass traffic, leading to a disconnect when traffic resumes.
Idle timeout issues can be mitigated by:
Rekey Operations. IPSec tunnels have security associations (SAs) with limited lifetimes. When these lifetimes expire, the tunnel must perform a rekey operation to establish new SAs.
Two primary rekey methods exist:
Several software issues or design challenges throughout the years have been seen on different vendors, including FortiClient, and were later fixed, which prevented the correct rekey, such as:
To troubleshoot these types of issues, the network administrator can capture and decrypt network traffic exchange with a sniffer for UDP, aiming to see the IKE traffic exchange. For more information on this troubleshooting technique, the following Article contains more information. Technical Tip: How to decrypt IPSec Phase-2 (ISAKMP) packets IKEv2
Hardware Offloading Issues. Modern FortiGate devices use specialized hardware (NPU - Network Processing Units) to accelerate IPSec traffic processing. While this generally improves performance, it can sometimes cause issues with specific traffic patterns or when combined with other features.
To determine if NPU offloading is causing disconnection issues, temporarily disable it for the problematic tunnel:
config vpn ipsec phase1-interface edit "tunnel-name" set npu-offload disable next end
Systematic Troubleshooting Methodology. Troubleshooting intermittent disconnections requires a methodical approach:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.