Comment 12 for bug 1689833

Revision history for this message
Nanzikambe (nanzikambe) wrote :

Seems upstream kindly solved this bug, the solution is to:

In /etc/default/openvpn

AUTOSTART="none"

In /etc/network/interfaces

iface ethX inet static
  address XXX.XXX.XXX.XX
  netmask 255.255.255.0
  openvpn my_vpn_name

Where ethX is your interface (ex, eth0 for a regular interface, eth0:1 for an alias of an interface), my_vpn_name is the base filename without the .conf suffix of your /etc/openvpn/my_vpn_name.conf file.

To explain, the above causes the script /etc/network/if-up.d/openvpn to get executed, this in turn executes systemctl --no-block start openvpn@my_vpn_name which starts the openvpn after the interface or alias is brought up.