9

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?

John Campion
  • 91
  • 1
  • 1
  • 2

7 Answers7

4

press F4 (it's listed in the title bar of the command window).

janjust
  • 592
  • 2
  • 5
4

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

Yarish Kumar
  • 141
  • 3
4

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

enter image description here

DAB
  • 153
  • 5
3

You can stop the service with:

net stop openvpnservice
Lucas Kauffman
  • 16,880
  • 9
  • 58
  • 93
paradroid
  • 868
  • 5
  • 15
  • 29
2

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.

Michael
  • 21
  • 1
1

they often have the command

vpnc-disconnect

Tom
  • 11,176
  • 5
  • 41
  • 63
-1

Refer below link, that might help you...

http://pwnt.be/2009/08/01/automating-openvpn-connection-on-windows-xp

Ankur Dholakiya
  • 458
  • 2
  • 9
  • 1
    Whilst 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