OpenVPN client connection not started on Ubuntu 16.04

Ubuntu 16.04 has systemd as its init system. Usually getting an OpenVPN client configuration going, is a matter of dropping the .conf or .ovpn file together with key and certs, into /etc/openvpn. On Ubuntu 16.04, you can ‘service openvpn restart’ all you like, but no connection is being initiated, and the logs stay silent.

Solution:

  1. edit /etc/default/openvpn, uncomment AUTOSTART=”all”
  2. sudo systemctl daemon-reload
  3. sudo service openvpn restart

The comments still say “all” is the default, but that is no longer true in Ubuntu 16.04.

It is also possible to systemd-manage individual server/client configurations, in the style of ‘service openvpn@<my-config> start/stop/status’. See https://fedoraproject.org/wiki/Openvpn#Setting_up_a_Linux_OpenVPN_client.

 

Leave a Reply