Description | This article provides some sample TeraTerm scripts for use when troubleshooting IPsec packet loss issues and includes a script for SSL-VPN performance monitoring. |
Scope | FortiGate v7. |
Solution |
These scripts are intended to collect diagnostic information when attempting to determine if a FortiGate is dropping IPsec tunnel traffic. This is not the cause of most IPsec tunnel issues and is not a productive first step in most cases. For general IPsec troubleshooting, see the overview article 'Troubleshooting IPsec Site-to-Site Tunnel Connectivity'.
For instructions on how to run and log a TeraTerm script, see the article 'Technical Tip: FortiGate monitoring script'.
NP6XLITE (most F-series models up to 201F) IPsec performance script: The provided script files likely require adjustment to match the environment.
Relevant commands:
get system status
execute time diag npu np6 anomaly-drop 0
Script Files:
Single-VDOM mode:
np6xlite_ipsec_novdom.ttl
Multi-VDOM mode (take simultaneously in different TeraTerm connections):
np6xlite_ipsec_global.ttl np6xlite_ipsec_root.ttl <----- Requires modification for VDOMs other than 'root'. Use with care since editing a VDOM that does not exist causes FortiGate to create it.
Other relevant diagnostics:
Modifying IPsec scripts for use with other FortiGate models:
If the traffic spans multiple NP chips, collect diagnostics from each relevant NP unit. TAC support might request different command outputs in the context of an existing support case.
Relevant commands:
exec date exec time diag vpn ssl list diag vpn ssl mux diag vpn ssl mux-stat diag sys top 1 50
TeraTerm Script Files:
sslvpn_monitor_novdom.ttl <-- requires
Other relevant diagnostics:
diagnose debug reset diagnose debug enable diagnose debug duration 0 diagnose debug console timestamp enable #diagnose vpn ssl debug-filter src-addr4 <client public IP address> #collect output diagnose debug reset
Note: Super Admin privilege is required to run 'fnsysctl' command. Otherwise, FortiGate will return an error as mentioned in this article: Technical Tip: fnsysctl command returns Unknown action 0 |
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.