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?

4

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

2
  • 2
    -1 they're looking for command line, not keyboard shortcuts – Mark Henderson Apr 8 '12 at 20:56
  • 4
    That'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 7:33
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

3

You can stop the service with:

net stop openvpnservice
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

enter image description here

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.

1

they often have the command

vpnc-disconnect

-1

Refer below link, that might help you...

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

1
  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Mark Henderson Apr 8 '12 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.