Skip to main content
Gab_FTNT
Staff & Editor
Staff & Editor
September 27, 2024

Troubleshooting Tip: How to troubleshoot intermittent IPsec dial-up VPN disconnection

  • September 27, 2024
  • 0 replies
  • 15491 views

Description

This article describes a solution and recommendations to identify the root cause of an IPsec dial-up user experiencing intermittent VPN disconnections.

Scope

FortiGate, FortiClient versions 7.2 and 7.4.

Solution

It is recommended to inspect traffic on both the FortiClient and FortiGate sides to identify the root cause.

Note: 

Packet captures and debug sessions should be run simultaneously.

Packet capture.

  1. Open a PuTTY session and make sure to save the Logs for future review.

  2. In PuTTY, under Category, select Logging, All Session output, and select the Folder location to save the File.

  3. Run the following command to capture IPsec traffic.


diagnose sniffer packet any " host <PublicIP of the Host getting disconnected> and port (500 or 4500) " 6 0 l


Sniffer.PNG


Note:

If the sniffer does not show any packets, make sure to temporarily disable npu-offload under phase1.

Once the disconnection happens, press Ctrl + C to stop the sniffer and convert the output to PCAP.
Refer to the following article to convert the sniffer to PCAP: Technical Tip: How to import 'diagnose sniffer packet' data to WireShark.

  1. Install Wireshark on the remote Host and start a packet capture using the following filter. It is important to select the correct interface when VPN signaling traffic is send out.


capture filter.PNG


After having successfully captured a disconnection, follow the steps in Technical Tip: Decrypt ESP packets to decrypt the ESP packets.

Debugging:

Run the following debug process in PuTTY to make sure the session does not get disconnected from the FortiGate.

Using the CLI in the GUI to collect the debug output may result in a file containing wrong formatting or a timeout disconnection from the session.

diagnose vpn ike log filter clear
diagnose vpn ike log filter rem-addr4 <PublicIP of the Host getting disconnected>
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug application fnbamd -1
diagnose debug enable


To stop the debugging process:

diagnose debug disable
diagnose debug reset


The command 'timestamp enable' debug can help filter the debug by looking at a specific time if the time and date of the disconnection are already known.

The command 'ike log-filter dst-addr4' can help filter for a host having a disconnection issue.

Note:

Starting from v7.4.1, the 'diagnose vpn ike log filter dst-addr4' command has been changed to 'diagnose vpn ike log filter rem-addr4'.


Firmware compatibility.

Release notes show the compatibility version between FortiGate and FortiClient software. It is recommended review versions compatibility to avoid issues related to this.

Example for FortiClient compatibility for version 7.4.7: Product integration and support.


VPN FortiGate debug logs:

VPN Logs can be useful to review for more information about the time of disconnection and the possible root cause.

From the FortiGate GUI, navigate to Log & Report -> System Events -> VPN Events.

VPN FortiClient debug logs:

FortiClient Endpoint Logs can also be collected: however, debug log level has to be selected.

Before any VPN connection attempt, VPN module and debug log level must be enabled:

10628b33.png


For a complete FortiClient Endpoint log analysis, the run diagnostic tool is recommended:

c3cc2b4c.png


FortiClient collection log details can be found in the articles below:


NPU Offload:

IPsec traffic entering the FortiGate is offloaded to the NPU, meaning it can sometimes be a cause of the disconnection.

To rule out the possibility of this issue being related to NPU offload, temporarily disable NPU offload under phase1: Disabling NP offloading for individual IPsec VPN phase 1s.

The tunnel is going down.

Check the Phase 2 settings and enable Autokey Keep Alive if the VPN tunnel frequently goes down.

DoS policy configuration.

DoS policy configuration should be verified on the specific interface where the IPsec dial-up VPN is bound if it is configured. It can be examined in Anomaly logs (Log & Report -> Security Events -> Anomaly logs) to determine if a DoS policy is incorrectly identifying VPN traffic as a threat and causing intermittent disconnections/slowness. 

 

Related articles:

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!