Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a VPN connection on a server that must be connected at all times. I can make a connection, but I would like it to connect on boot, and if the connection drops it should reconnect automatically, preferably with some sort of notification that the connection has gone down but is now back up. The VPN is on OpenVPN.

What is the best way to do this?

share|improve this question
Actually there is an option "Connect automatically", but it doesn't seem to work. – lumbric Feb 7 '12 at 15:07

1 Answer

I assume you now have it configured with network manager under X.

But you can also configure a client-vpn-connecton in a config file and put it in /etc/openvpn/. Openvpn should start as a service when booting your client machine and start all configurations found.

From the quickstart guide on openvpn.net:

The initscript will scan for .conf configuration files in /etc/openvpn, and if found, > will start up a separate OpenVPN daemon for each file.

Check out: openvpn Client Example Config and Ubuntu Communitu Documentation - OpenVPN more information.

share|improve this answer

protected by RolandiXor Feb 9 '12 at 15:45

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

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