Skip to main content
Cristiano_
Visitor III
Apr 12, 2024 7:33 AM UTC
Question

FortiClient Vpn

HI,
I'm using FortiClientVPN version 7.2.4.0972 for windows systems to make an SSL-Ipsec connection, and everything works fine.
I can't figure out if there is a possibility to start the connection via CLI or Batch files.

Here in the community I read a post about it where they recommended using the following command:

- FortiSSLVPNclient.exe connect -s MyCompanyName i -m -q (No Certificate)
- FortiSSLVPNclient.exe connect -s MyCompanyName -c FCT.net:earth-EARTH-CA -i -m -q (with Certificate)

I tried but the software starts automatically but not the connection, so you need to click on Connect and Disconnect.
I would like to do just that from CLI.

8 replies

thelsun1
New Member
Apr 12, 2024 7:58 AM UTC

Have a look at the output of "route print" and determine what traffic is being routed down the VPN tunnel when you're connected. It could either be a full-tunnel, wherein all your traffic is routed down the tunnel, or it could be a split-tunnel wherein only the address ranges reachable via the VPN are routed down the tunnel https://vidmate.onl/ .

Translate
ndumaj
Staff
Staff
Apr 12, 2024 1:02 PM UTC

Hello,

This is the Article that it is explaining the CLI option:
https://community.fortinet.com/t5/FortiClient/Technical-Tip-How-to-use-FortiClient-SSL-VPN-from-the-CLI/ta-p/192581

If still doesn't work, maybe the FCT logs should provide more information.

BR

Translate
Hong_FTNT
Staff & Editor
Staff & Editor
Apr 12, 2024 1:16 PM UTC

Hi @Cristiano_,

 

Those commands will prompt for username and password as you didn't provide them. You can use the following commands instead: 

 

FortiSSLVPNclient.exe connect -s name -h 192.168.10.2:10443 -u guest:vpn123 -i -m -q

 

For more information, please refer to https://community.fortinet.com/t5/FortiClient/Technical-Tip-How-to-use-FortiClient-SSL-VPN-from-the-CLI/ta-p/192581

 

Regards, 

Translate
Cristiano_
Visitor III
Apr 12, 2024 1:51 PM UTC

Yes, I actually followed the same guide.
I'm trying with a certificate-only profile
Then the command FortiSSLVPNclient.exe connect -s MyCompanyName -c FCT.net:earth-EARTH-CA -i -m -q (with Certificate)
it should be the correct one, but the connection does not start automatically.
I have to be the one to click Connect.

 

Another thing I noticed... is that I don't have FortiSSLVPNclient.exe but FortiClient.exe
Could this be the problem?

Translate
Hong_FTNT
Staff & Editor
Staff & Editor
Apr 13, 2024 2:45 PM UTC

@Cristiano_,

 

Please make sure you are using FortiSSLVPNclient.exe. As I mentioned, if you want to be able to connect directly from the CLI without having to click connect, you must provide the credentials in the CLI. If you are using certificate, you need to provide username, password, and certificate. For example: 

 

FortiSSLVPNclient.exe connect -s name -h 192.168.10.2:10443 -u guest:vpn123 -c FCT.net:earth-EARTH-CA -i -m -q

 

Regards, 

Translate
gossi123
New Member
Apr 15, 2024 11:27 AM UTC

Try adding --auto flag to establish VPN connections seamlessly via CLI. Here's a modified example:
FortiSSLVPNclient.exe connect --auto -s MyCompanyName [-c FCT.net:earth-EARTH-CA] (-i | -nc) -m -q

This might initiate automatic connections right after launching instead of requiring manual intervention. Ensure compatibility across different versions before implementing changes. Happy exploring like this https://seasonalholidaysinn.com/ !

Translate
Cristiano_
Visitor III
Apr 15, 2024 3:08 PM UTC

nothing, I can only get this page to open.
But then nothing starts without my clicking on (connect)

I think the problem is that in the free version there is no executable (FortiSSLVPNclient.exe) and therefore the CLI commands work halfway

 

 

v.JPG

Translate
Cristiano_
Visitor III
Apr 17, 2024 3:02 PM UTC

Inside FortiClientTools_7.2.4.0972 there is no SSLVPNcmdline folder.
In which version can I find it?

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