Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Cristiano_
New Contributor

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 8
thelsun1
New Contributor

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

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

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

BR

- Happy to help, hit like and accept the solution -
hbac
Staff
Staff

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

 

Regards, 

Cristiano_
New Contributor

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

@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 Contributor II

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_
New Contributor

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_
New Contributor

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

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors