VPN connect / disconnect using command line?

VPN connect / disconnect using command line?

avatar

Hi!

I'm trying to integrate a SSL VPN Client:
FortiClient SSL VPN client (not FortiClient Endpoint Security, but the standalone VPN Client)

There's command lines to connect and disconnect from preconfigured VPN connections, e.g.
FortiSSLVPNclient.exe connect -s "connection name"
FortiSSLVPNclient.exe disconnect

I'm trying to make it automatically connect to the VPN before opening a RDP session, and prompt to disconnect after the session is closed.
I have configured such constellations with Microsoft VPN (rasdial) arleady. I have created a seperate VPN session and set the RDP session to use the other VPN.

My problem is, that a 'command line' session type does not have a disconnect command.
So the connection is established, the icon turns into the green play symbol but there's no way RDM can know if it's actually connected or not.
The icon just stays green.

So what I'd like to see (the whish of the day) is some sort of 'custom VPN connection' type.
You'd create a session, set it to custom VPN, and enter commands for 'connect', 'disconnect' and perhaps even 'check connection status'.
That way you could easily integrate non-supported VPN clients that do offer a command line. And there are a lot of non-supported VPN clients, as every firewall vendor (FortiNet, Cisco, ZyWall, Netgear ...) does their own thing.

What would be a solution for this? or do I have to live with manually disconnecting?


Another feature request came to my mind:

There's already the 'connect if unable to ping' option in the VPN tab.
Right now, it pings the host, and when it times out it initiates the VPN connection and immediately opens the session.
However, the VPN connection can take some time to go up, and it can happen that it tries to connect to the remote host before the VPN is up.

So, a cool solution would be a 'wait for ping response before connecting' option. So that it sends a couple of pings at an interval, and starts the session only when the first response arrives (or, after X timed out pings, the whole session times out)
That way you can reliably connect to VPN first and then to the remote desktop host.

Alright, thanks and have a good one!
Daniel

All Comments (2)

avatar

Hi,
You should try to use the Generic VPN instead when you want to create a custom VPN, it's an add-on that support a connect and disconnect command. I verified for the FortiClient and the add-on support SSL VPN, have you tried it?

I added your feature request, it's a good idea. Thank you

David Hervieux

avatar




Just noticed that add-ons exist :) a whole new world emerges.
I'm really amazed by this product...

thanks