Skip to main content
tonystephens
New Member
October 9, 2024
Solved

FortiClient SSLVPN CLI (Command Line)

  • October 9, 2024
  • 4 replies
  • 21598 views

Hi All,
I currently have a client who uses the FortiClient VPN (Zero trust Fabric Agent) Version 7.4.0.1658. Using the GUI work fine, no problems. However, when trying using the CLI (from this article) it fails. The process I followed was.

 

  • Execute FortiSSLVPNclient.exe (version 7.4.1658)
  • Click settings,
  • Create a new connection (eg: MyCo), [Note the Client isn't saving the 'Do not warn about server certificate validation failure' or the 'User Name' and 'Password' in the Connection Settings dialogue box.] I'm running the exe as Admin.
  • Once I've created the connection, the command line I'm using is: FortiSSLVPNclient.exe connect -s MyCo -h [IP]:[Port] -u [userid]:[password] i -m -q

All that happens is the GUI appears, then if I click connect it flashes "connecting", then immediately back to "Disconnected". I've upped the logging of the FortiClient SSLVPN to "everything" but can't find the logs - LOL.

Any help would be appreciated.
Regards:
Tony.

Best answer by tonystephens

Hey folks,

I just had a HP Wolf Security update force a reboot, and now it's working fine... very weird! It connects first time via GUI & CLI. No idea what that's about. 

I hope I haven't wasted your time.

Have a good day.

Tony.

4 replies

rahul_p1
Staff
Staff
October 9, 2024

Hi, 

Can you please share on which OS you are running Forticlient via CLI?

Do you have EMS for Forticlient?

Please refer to this article:- Possible reasons for FortiClient SSL VPN ... - Fortinet Community

 

 

tonystephens
New Member
October 10, 2024

Hey Rahul, 


No, we don't have EMS. I'll take a look at the "Possible reasons for FortiClient SSL VPN connectivity failure...." and see how it goes. The FortiSSLVPNclient.exe (when I use the GUI) doesn't save the connections. 

When I use the CLI (C:\Software\SSLVPNcmdline>FortiSSLVPNclient.exe connect -s MYCO -h myco.hostname.com:9443 -u adminid:password i -m -q) it displays the UI and fails to connect.


forticlientssl-3.png















If I use the FortiClient - Zero Trust Fabric Agent UI, it connects fine.

 

 

arahman
Staff
Staff
October 9, 2024

Hi, please follow the article below to connect forticlient ssl vpn via cli

 

https://community.fortinet.com/t5/FortiClient/Technical-Tip-How-to-use-FortiClient-SSL-VPN-from-the-CLI/ta-p/192581

tonystephens
New Member
October 10, 2024

Hi Arahman, 


Thanks for replying, however I have looked at that article, I referred to it in my post
"However, when trying using the CLI (from this article) it fails."

Any other suggestions?

Shashwati
Staff
Staff
October 10, 2024

Hello 

Please run the packet capture on firewall while trying to connect using CLI

diagnose sniffer packet any 'host X.X.X.X' 4 0 l    [X.X.X.X user IP address]

tonystephens
tonystephensAuthorAnswer
New Member
October 10, 2024

Hey folks,

I just had a HP Wolf Security update force a reboot, and now it's working fine... very weird! It connects first time via GUI & CLI. No idea what that's about. 

I hope I haven't wasted your time.

Have a good day.

Tony.