I know how to connect to an openvpn via a command line in Windows XP. What I can't figure out is how to end the connection. Any thoughts?
7 Answers
press F4 (it's listed in the title bar of the command window).

- 592
- 2
- 5
-
2-1 they're looking for command line, not keyboard shortcuts – Mark Henderson Apr 08 '12 at 20:56
-
4That's the correct answer: When you're starting `openvpn.exe` on command line, the only way to disconnect is to hit F4. `CTRL-C` is ineffective. – Nicolas Guillaumin Jun 30 '13 at 07:33
Its looks like openvpn doesnot have disconnect option. But you can use taskkill command to disconnect the vpn connection. I have tested myself. It is properly disconnecting instead of abruptly killing openvpn.
taskkill.exe /F /IM openvpn.exe

- 141
- 3
The above answers didn't work for me. The question is about Windows XP, but I thought I would answer for Windows 10 anyway.
You can now run the GUI program with a large number of options. To disconnect a specific client execute the following (this worked in October 2019 with OpenVPN version 11.10 64bit)
"c:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect <client-name>
Or disconnect all connections, regardless of name
"c:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect_all
Many other options are also available

- 153
- 5
You can stop the service with:
net stop openvpnservice

- 16,880
- 9
- 58
- 93

- 868
- 5
- 15
- 29
Don't know if this works for XP or when it was introduced, but you can now use this to disconnect
"%ProgramFiles\OpenVPN Technologies\OpenVPN Client\core\ovpncli.exe" disconnect
on 64bit
"%ProgramFiles(x86)\OpenVPN Technologies\OpenVPN Client\core\ovpncli.exe" disconnect
I know old post, but this is the first result google gave when I was looking how to do this.

- 21
- 1
Refer below link, that might help you...
http://pwnt.be/2009/08/01/automating-openvpn-connection-on-windows-xp

- 458
- 2
- 9
-
1Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Mark Henderson Apr 08 '12 at 20:54