I have a couple of OpenVPN connections to various servers that are autostarted when I log into my laptop. Other connections, to production servers, have to be set up manually. Until recently I ran Ubuntu 14.04, where I could run things like

sudo service openvpn start production-server-21

to add a connection. Since upgrading to Ubuntu 16.04, and systemd, this no longer works. Is there still a simple way to add a connection or do I have to

cd /etc/openvpn
sudo openvpn --config production-server-21.conf &

which is much less nice (can't use full path for config file, as it contains relative references to keys/certs).

  • 1
    this answer seems to suggest the equivalent is sudo systemctl start openvpn@production-server-21.service.
    – meuh
    Jul 15 '16 at 16:09

It turns out that

sudo service openvpn@production-server-21 start

works, as well as something similar to what @meuh suggested in their comment:

sudo systemctl start openvpn@production-server-21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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