[Solved] cmd connect/disconnect in windows

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Locked
andreask
OpenVpn Newbie
Posts: 11
Joined: Thu Mar 28, 2013 12:50 pm

[Solved] cmd connect/disconnect in windows

Post by andreask » Sun Nov 17, 2013 5:21 pm

How can I connect / disconnect openVpnGui using the commandline on windows?

Thanks!
Andreas

---

T:\PortableApps\OpenVPNPortable\data\config>..\..\app\bin\openvpn.exe --config config.ovpn

Sun Nov 17 18:03:02 2013 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built on Dec 15 2011
Sun Nov 17 18:03:02 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Nov 17 18:03:02 2013 LZO compression initialized
Sun Nov 17 18:03:02 2013 TAP-WIN32 device [Local Area Connection 3] opened: \\.\Global\{7FBLABLABLAD5}.tap
Sun Nov 17 18:03:02 2013 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.BLA.BLA.BLA/255.255.255.252 on interface {7FBLABLABLAD5} [DHCP-serv: 10.BLABLABLA, lease-time: 31536000]
Sun Nov 17 18:03:02 2013 UDPv4 link local (bound): [undef]:1194
Sun Nov 17 18:03:02 2013 UDPv4 link remote: 83.BLA.BLA.BLA:1194
Sun Nov 17 18:03:11 2013 Peer Connection Initiated with 83.BLA.BLA.BLA:1194
Sun Nov 17 18:03:17 2013 Initialization Sequence Completed


so it works. I can start the connection using the commandline.

and I can end it using
taskkill.exe /F /IM openvpn.exe

But the GUI is not informed, the cute computers do not switch from red to green
... and subsequently the GUI stops working. I cannot "disconnect" using the gui.


---

The other approach I could think of is to invoke the "connect" command of the openvpn-gui

T:\PortableApps\OpenVPNPortable\data\config>..\..\app\bin\openvpn-gui.exe --connect config.ovpn

but that results in "OpenVPN GUI is already running"
Last edited by debbie10t on Thu Feb 13, 2014 9:41 pm, edited 1 time in total.
Reason: [Solved / closed]

Edwar522
OpenVpn Newbie
Posts: 2
Joined: Wed Jan 22, 2014 3:29 am

Re: cmd connect/disconnect in windows

Post by Edwar522 » Wed Jan 22, 2014 3:38 am

Hi, I'm, using openvpn-client 1.5.6 and I need connet vpn using the commandline but this not run. With openvpn-gui is not problem. Can you help me with this? thanks, and sorry for my english, I speak spanish.

Edwar522
OpenVpn Newbie
Posts: 2
Joined: Wed Jan 22, 2014 3:29 am

Re: cmd connect/disconnect in windows

Post by Edwar522 » Thu Jan 23, 2014 2:49 am

Hi, I downloaded the openvpn client desktop for windows from this link; http://openvpn.net/index.php/access-ser ... w/357.html

This version run with Windows 8. The openvpn-gui ( http://openvpn.net/index.php/download/c ... loads.html ) not run ok with Windows 8, sometimes connet, sometimes not connet; but with openvpn client desktop for windows from this link; http://openvpn.net/index.php/access-ser ... w/357.html, this problem not exist. I need start vpn connection without user intervention with Windows 8.

Thanks.

Locked