Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
wigi
New Contributor

FortiClient from the command line interface

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

5 REPLIES 5
jesusabdiarai
New Contributor

Hello, I have a similar problem, could you tell me what was your solution?

wigi

Hello,

 

No response received and I also found no solution myself. Let me know if you do.

Parad0x92
New Contributor

If the error is:guimessenger.png
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:
guimessenger2.png

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"
guimessenger3.png

...

---------------------------
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:
guimessenger4.png


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...

sgupta
New Contributor

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

lolo101
New Contributor II

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

Labels
Top Kudoed Authors