Skip to main content
tonystephens
New Member
Oct 9, 2024 1:43 AM UTC
Solved

FortiClient SSLVPN CLI (Command Line)

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.

tonystephens
New Member
Oct 10, 2024 10:11 PM UTC

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.

6 replies

rahul_p1
Staff
Staff
Oct 9, 2024 4:02 AM UTC

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

 

 

Translate
tonystephens
New Member
Oct 10, 2024 9:37 PM UTC

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.

 

 

Translate
arahman
Staff
Staff
Oct 9, 2024 11:59 AM UTC

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

Translate
tonystephens
New Member
Oct 10, 2024 9:17 PM UTC

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?

Translate
Shashwati
Staff
Staff
Oct 10, 2024 9:32 PM UTC

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]

Translate
tonystephens
tonystephensAuthorAnswer
New Member
Oct 10, 2024 10:11 PM UTC

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.

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024