FortiClient VPN Post Login Script

How to use FortiClient VPN Post Login Script

0
(0)

Run FortiClient SSL VPN from CLI and Scripts

This article describes how to use the FortiClient SSL VPN from the Windows command line, and apply from batch scripts. The FortiClient, available for FortiGate for all known operating systems, can be downloaded from the Fortinet Support section. In addition to the FortiClient 6.4.2.1580 for Windows used here, the FortiClientTools 6.0.9.0277 are also used.

FortiClient VPN Windows  Installation
FortiClient VPN

After the FortiClient is installed, we leave the VPN configuration left blank. Now the FortiClientTools are unpacked into a directory, of interest is the folder contents of SSLVPNcmdline, here the file FortiSSLVPNclient.exe is to be found, along with the Microsoft Visual C++ Redistributable mfc140.dll, msvcp140.dll, vcruntime140.dll runtime components.

Contents of SSLVPNcmdline FortiClientTools_6.0.9.0277.zip.

Running FortiSSLVPNclient.exe opens the GUI.

FortiClient SSLVPN Tool Installation auf Windows
FortiClient SSLVPN

We decide not to use the VPN connection profile stored in Settings, instead to connect from CLI with append parameters.

It is now a good way to start the VPN connection with login and network drive mapping from the script, the following batch file should enable this.

With connect -h will connect to the VPN gateway, the IP address and the port number separated by a colon. The user -u who should log in to the gateway and the password after the colon. Cause timeout wait 10 seconds to VPN connection to be established before execute network drive mapping. The value may be reduced or it must be increased.

In the taskbar, the FortiSSLVPNclient icon, over which the context menu opens with a right click.

The VPN connection is disconnected with the following script.

FortiSSLVPNclient Command Line Usage
Usage: FortiSSLVPNclient.exe [options] [args]

FortiSSLVPNClient Tool Help Site

Source link: Fortinet Knowledge Base

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *