Skip to main content
GiannisChari
Staff
Staff
Nov 29, 2024 12:50 PM UTC

Technical Tip: How to start a Dial-up IPsec tunnel from commadline on Windows with FortiClient

Description This article describes how to establish a dial-up VPN with FortiClient using command prompt on Windows.
Scope FortiClient, Windows, FortiGate.
Solution

FortiClient on Windows runs a process on the background called FortiTray that performs most the task like establishing SSL VPN tunnel. However, for IPsec, it uses another binary called 'IPsec.exe' to spawn a child process.

 

IPsec_bin.png

 

This binary can be executed with elevate privileges from the command prompt as shown in the picture below:

 

CMD.png

 

The command syntax is:

 

ipsec.exe tunnel <Tunnel_name_here>

 

In this case, the tunnel name is IPsecTunnel1 and it is configured either on the EMS server or on FortiClient console.

 

IPsec_config.png

    1 reply

    facundo59
    Explorer
    May 4, 2026 7:04 AM UTC

    This only works is the password is saved, right? Is there no way to pass the username and password through the cli?

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT