Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make a OpenVPN run automatically whenever my system is connected to the internet?

share|improve this question
Please use "OpenVPN" instead of "VPN". From your other question, I guess you really meant "OpenVPN". – Lekensteyn Mar 6 '11 at 9:18
@Lekensteyn, it would benefit more people if there was a way to connect to all types of VPN. – Oxwivi Mar 6 '11 at 10:53
that depends on the configuration, when using Network Manager, you can check "Automatically connect" on a VPN. – Lekensteyn Mar 6 '11 at 10:56
@Lekensteyn, that never worked for me with either PPTP or OpenVPN. And since you're replying to my post, there's no need to tag me. When it's not the post of the user you're replying to, then you need to tag @[user]. – Oxwivi Mar 6 '11 at 10:58
up vote 2 down vote accepted

When OpenVPN starts with a VPN (/etc/openvpn/*.conf), it will continue to try connecting to the server. No worries :)

share|improve this answer
So I just need to have OpenVPN on my startup list? – Oxwivi Mar 6 '11 at 9:18
When installing OpenVPN, it puts a startup script at /etc/init.d/openvpn. This script starts any VPN configurations defined in /etc/openvpn/*.conf. The packaga manager already took care of starting the services, all you have to do after installing OpenVPN is creating a configuration file in /etc/openvpn/*.conf, which you've already done. – Lekensteyn Mar 6 '11 at 9:20

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.