Hello all,
I would like to start a VPN connection through the FortiClient from command line interface.
It all works fine manually but I cannot get the syntax right, it seems. Please see the attached picture.
Using online resources, I think it should be someting along these lines:
"C:\Program Files\Fortinet\FortiClient\FortiClient.exe" connect -s "Aexis VPN" -u wgielis:MY_PASSWORD
Version: 6.0.0.0067
https://kb.fortinet.com/kb/documentLink.do?externalID=FD41256
https://forum.fortinet.com/tm.aspx?m=123014
Thanks a lot for any pointers !
Wim
Hello, I have a similar problem, could you tell me what was your solution?
Hello,
No response received and I also found no solution myself. Let me know if you do.
Created on 01-16-2023 08:28 AM Edited on 01-16-2023 03:39 PM
If the error is:
Error: Cannot open C:\Program Files\Fortinet\FortiClient\resources\app.asar\assets\js\guimessenger64.node: Error: No se puede encontrar el módulo especificado.
--------
EDIT1:
As it cannot find app.asar\assets\js\guimessenger64.node
I tried to backup "app.asar" file and copying "app.asar.unpacked" as it's a folder:
CD "C:\Program Files\Fortinet\FortiClient\resources"
COPY app.asar app_old.asar
DEL app.asar
MD app.asar\assets\js
COPY app.asar.unpacked\assets\js\guimessenger64.node app.asar\assets\js\guimessenger64.node
It stopped showing the error, but still doesn't work:
NOTES: (Still trying to figure out what's wrong with it)
In File: "app.asar" Line: 62027 you got this code which means you require "app.asar.unpacked/assets/js/guimessenger64.node".. but the command invokes
"app.asar/assets/js/guimessenger64.node"
...
---------------------------
EDIT2:
After a while trying to figure it out... i already noticed i was using old C++ redistributables... So let's start again...
1.- Install last c++ redistributables (VC_redist.x64)
After that you may get next error:
2.- Then you can: FortiClientFortiClient.exe connect -s "CLIENT" -u user:passwd
3.- BUT you CANNOT: "C:\Program Files\Fortinet\FortiClientFortiClient.exe" connect -s "CLIENT" -u user:passwd
4.- So create a system envoirment variable to solve it.
4.-(FIX 2) Execute it as follows:
cd "C:\Program Files\Fortinet\FortiClient" & FortiClient.exe connect -s "CLIENT" -u user:password
FortiClient will pop up, but connection won't work... anyways if you go by interface and connect/disconect from the VPN, you'll see all events returning info by the prompt...
In my case, the connection shows up when I use the command line option, but traffic is not passing. Only Packets sent is increasing, but zero packets received. When I use the installed forticlient (EMS managed) to connect to the same tunnel it works fine without any issues. I am using 7.0.8 for both the forticlient GUI as well as the forticlient tools
my config :
Ubuntu 23.04
Forticlient 7.0.8.0292
Similar issue : 0 bytes received.
Even when I disconnect the VPN I receive no more bytes. I have to restart the PC to have my connection up again
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1741 | |
1109 | |
755 | |
447 | |
240 |
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.