This article describes troubleshooting and creating a general IPsec VPN script using Tera Term.
FortiOS.
The following script is designed to gather relevant debug information related to IPsec VPN issues. Issues may be encountered where the IPsec VPN intermittently goes down or keeps flapping. A script can be used to capture logs automatically. This will help ensure that all necessary data is collected in advance before opening a case with TAC.
Refer to Preparing Windows machine to run Teraterm scripts for instructions on how to use Tera Term.
Note:
If the script logs out automatically, try increasing the login timeout duration using the following command:
config system global
set admin-ssh-grace-time <number_of_seconds> <max 3600 seconds>
end
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.