How to run OpenVPN client in a new CE 21 install?

After 3 years it’s about time for a fresh install on my Odroid N2’s. Going from 19.5 to 21.0.

In my previous install i ran the Openvpn from systemctl: “systemctl enable openvpn.service” as indicated in /storage/.config/system.d/openvpn.service.sample

Now i get the message that “openvpn.service does not exist”

I also noticed a connman-vpn.service which i haven’t seen before.

Is there a new approach to running an OpenVPN client connection?

Regards,

Eek NL

i think you need

installentware

and reboot, after that:

opkg install openvpn-openssl openvpn-easy-rsa network-online.service

and set : /config/system.d/openvpn.service

[Unit]
Description=OpenVPN Autorun Service

[Service]
Type=forking
Requires=network-online.service
After=network-online.service
ExecStart=/usr/sbin/openvpn --daemon --config /storage/.config/nameyourfile.ovpn
Restart=always
RestartSec=15

[Install]
WantedBy=kodi.target

and set : config/sleep.d/01-openvpn.power

#!/bin/sh
   case "$1" in
     pre)
     systemctl stop openvpn.service
     ;;
     post)
     systemctl start openvpn.service
     ;;
 esac
systemctl enable network-online.service
systemctl enable openvpn.service

and you can add your.ovpn on
/config/autostart.sh

#!/bin/sh
(
sleep 20s
/usr/sbin/openvpn --daemon --config /storage/.config/your.ovpn &
)&

Thanks, you put me on the right path again.

However, i just needed to create the /storage/.config/system.d/openvpn.service file (with the contents of the .sample file) to be able to enable openvpn.service in systemctl

Thanks again!