You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of creating an entry in /etc/systemd/network, you could create the tun device in the unit file (and destroy it after as well). This would keep the list of links less cluttered when it's not running.
To do this, you can delete the systemd-network netdev file and add a file at /etc/systemd/system/openvpn-client@{configname}.service.d/tuntap.conf containing:
[Service] ExecStartPre=+/usr/bin/ip tuntap del name tun-pia mode tun ExecStartPre=+/usr/bin/ip tuntap add name tun-vpn mode tun user openvpn group openvpn ExecStopPost=+/usr/bin/ip tuntap del name tun-vpn mode tun
Replacing tun-vpn and the user/group as needed.
The text was updated successfully, but these errors were encountered:
Instead of creating an entry in /etc/systemd/network, you could create the tun device in the unit file (and destroy it after as well). This would keep the list of links less cluttered when it's not running.
To do this, you can delete the systemd-network netdev file and add a file at
/etc/systemd/system/openvpn-client@{configname}.service.d/tuntap.conf
containing:[Service]
ExecStartPre=+/usr/bin/ip tuntap del name tun-pia mode tun
ExecStartPre=+/usr/bin/ip tuntap add name tun-vpn mode tun user openvpn group openvpn
ExecStopPost=+/usr/bin/ip tuntap del name tun-vpn mode tun
Replacing tun-vpn and the user/group as needed.
The text was updated successfully, but these errors were encountered: