- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I have a similar problem, could you tell me what was your solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Man you did a great job there, it is a shame that it is not supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This seems to be an older topic but I had this working then after a client change I got the same error. I looked at my file and noticed errant quotes. I changed my to the below sample. I would start with an open " and then end with a closing " and none in the middle.
"C:\Program Files\Fortinet\FortiClient\FortiClient.exe VPN NAME GOES HERE"
@wigi wrote: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 !
