[Solved] cmd connect/disconnect in windows
Posted: 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"
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"