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 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

Thanks!

share|improve this question
add comment

2 Answers 2

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 at 15:09
    
yes the client.conf must be moved there –  Amith KK Feb 18 at 16:08
    
hmmm moving client.conf from /etc/openvpn to /etc/default didn't seem to make any difference. –  user1373779 Feb 18 at 16:19
    
Did you try running sudo update-rc.d openvpn enable ? –  Amith KK Feb 18 at 18:18
    
Tried that and unfortunately didn't work –  user1373779 Feb 18 at 21:55
add comment

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
add comment

Your Answer

 
discard

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.