Skip to main content
Cristiano_
Visitor III
April 12, 2024
Question

FortiClient Vpn

  • April 12, 2024
  • 7 replies
  • 4249 views

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.

7 replies

thelsun1
New Member
April 12, 2024

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

ndumaj
Staff
Staff
April 12, 2024

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

hbac
Staff
Staff
April 12, 2024

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, 

Cristiano_
Visitor III
April 12, 2024

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?

hbac
Staff
Staff
April 13, 2024

@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, 

gossi123
New Member
April 15, 2024

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/ !

Cristiano_
Visitor III
April 15, 2024

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

Cristiano_
Visitor III
April 17, 2024

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