Connecting via CLI?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Peregrino69
OpenVpn Newbie
Posts: 6
Joined: Wed Aug 25, 2021 10:51 am

Connecting via CLI?

Post by Peregrino69 » Wed Aug 25, 2021 11:04 am

OS Win 10, OpenVPN Connect ver 3.3.1 (2222)

I'm trying to create a bat file that would first connect my WiFi, and once that's established connect VPN. Starting WiFi connection with netsh works, but not the VPN connection. Command

Code: Select all

openvpnconnect <full path>\profile.ovpn
loads the GUI and shows the available profiles. What I'd like to happen is the client to actually connect using the defined profile.

Is that even possible, if yes, how?

Peregrino69
OpenVpn Newbie
Posts: 6
Joined: Wed Aug 25, 2021 10:51 am

Re: Connecting via CLI?

Post by Peregrino69 » Fri Aug 27, 2021 10:38 am

Should I understand "No, there's no way to have Windows OpenVPN client connect automatically when launched from CMD", or am I just being hasty?

Peregrino69
OpenVpn Newbie
Posts: 6
Joined: Wed Aug 25, 2021 10:51 am

Re: Connecting via CLI?

Post by Peregrino69 » Fri Aug 27, 2021 11:45 am

So far looks like the answer is indeed no, not possible with OpenVPN Connect. Only with the OpenVPN Community client 2.5.3.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Connecting via CLI?

Post by openvpn_inc » Mon Aug 30, 2021 11:54 am

Hello Peregrino69,

OpenVPN Connect v3.3 has command line parameters for configuring the client program, importing, renaming, deleting of profiles, and other options. In a future release we will add more command line parameters to control the connection from the command line.

At this time if you need command line support for connecting, use the community client.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Peregrino69
OpenVpn Newbie
Posts: 6
Joined: Wed Aug 25, 2021 10:51 am

Re: Connecting via CLI?

Post by Peregrino69 » Wed Sep 01, 2021 1:48 pm

Thank you, Johan

Importing profiles and all that jazz worked well enough with the Connect client. I was just missing that last step, automatic connection w/o user intervention.

The community client indeed provides that, good enough for my current needs. I hope Connect client gets the same functionality in the future.

Post Reply