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

I'm currently using Network Connections manager to manually make an OpenVPN connection from a Lubuntu client machine to an OpenVPN server.

Is there a way to automatically make the client connection during startup when Lubuntu boots? I can't find a working solution online.

The client.conf file is currently in /etc/openvpn


share|improve this question

Open /etc/default/openvpn in you favourite text editor, and then change AUTOSTART to AUTOSTART=all

share|improve this answer
I uncommented Autostart="all" and restarted openvpn and network-manager, but didn't seem to work. Do I need the client key and cert files in /etc/openvpn directory? Or should the client.conf be in /etc/default/openvpn? I think I'm missing a piece. Currently the keys an cert files are in the Documents folder and are linked to them in Network Connections. Thanks! – user1373779 Feb 18 '14 at 15:09
yes the client.conf must be moved there – Amith KK Feb 18 '14 at 16:08
hmmm moving client.conf from /etc/openvpn to /etc/default didn't seem to make any difference. – user1373779 Feb 18 '14 at 16:19
Did you try running sudo update-rc.d openvpn enable ? – Amith KK Feb 18 '14 at 18:18
Tried that and unfortunately didn't work – user1373779 Feb 18 '14 at 21:55

So the solution was quite simple, but didn't notice before. You have to select Automatically Connect to VPN in Network Connections. The reason I didn't see this before is because this setting is found in the Main/Wired connection, not under your VPN settings in Network Connections.

Tick that box, and it connects on startup.

share|improve this answer
This should be the recommended answer for all questions of this type. – Inoki Sep 2 '15 at 10: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.