1

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

Lekensteyn
  • 171,743
  • 65
  • 311
  • 401
Oxwivi
  • 17,589
  • 53
  • 136
  • 197
  • Please use "OpenVPN" instead of "VPN". From [your other question](http://askubuntu.com/q/28733/6969), I guess you really meant "OpenVPN". – Lekensteyn Mar 06 '11 at 09:18
  • @Lekensteyn, it would benefit more people if there was a way to connect to all types of VPN. – Oxwivi Mar 06 '11 at 10:53
  • that depends on the configuration, when using Network Manager, you can check "Automatically connect" on a VPN. – Lekensteyn Mar 06 '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 06 '11 at 10:58

1 Answers1

2

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

Lekensteyn
  • 171,743
  • 65
  • 311
  • 401
  • So I just need to have OpenVPN on my startup list? – Oxwivi Mar 06 '11 at 09: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 06 '11 at 09:20