Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm connecting using VPNBook servers and it works fine with this command:

 sudo openvpn --config /etc/openvpn/vpnbook-udp-53.ovpn --auth-user-pass /etc/openvpn/password.txt

but I just can't seem to figure out how to stop it without a reboot.

I've tried service openvpn stop and /etc/init.d/vpnbook stop, but that doesn't seem to affect it.

share|improve this question
How exactly with ifconfig? –  Adam May 23 '13 at 13:59
Which one would it be? eth0, lo, tun2, or wlan0 –  Adam May 23 '13 at 14:13
simply do > sudo /etc/init.d/network-manager restart < –  Qasim May 23 '13 at 15:06
I am curious, when a VPN is started this way does it not show up in the network manager. I have only always used the network manager connect and disconnect and don't currently have a VPN to test but wondered. –  Dennis Feb 19 '14 at 12:49

4 Answers 4

This command definitely works for me, and it should work for you too.

sudo killall openvpn
share|improve this answer

Try this

killall -SIGINT openvpn

You can get more info on different signals you can send here: http://openvpn.net/index.php/open-source/documentation/howto.html#control

share|improve this answer
killall -SIGINT openvpn openvpn(15360): Operation not permitted openvpn: no process found sudo killall -SICINT openvpn SICINT: unknown signal; killall -l lists signals. –  Adam May 23 '13 at 13:57
sudo killall openvpn in a new terminal worked for me. –  Adam May 24 '13 at 18:09

The successful steps in my case were:

# stop the service    
$ sudo /etc/init.d/openvpn stop

# find the process if for some reason it keeps running
$ lsof -i | grep openvpn

# kill the proccess(s) by its PID
$ kill -9 <PID>

# if necessary restart the service again
$ sudo /etc/init.d/openvpn start

For some reason killall -SIGIN openvpn did not work for me, but the steps above did.

share|improve this answer

Just hit CTRL+C in the terminal you just started OpenVPN.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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