VPN Before TOR gateway works half of the time

I setup a VPN before tor in my gateway with a rebuild openvpn to enable iproute2

What is the default way to start the vpn with this setup?

I only get it to work like this:

sudo /usr/sbin/openvpn --rmtun --dev tun0
sudo /usr/sbin/openvpn --mktun --dev tun0 --dev-type tun --user tunnel --group tunnel
cd /etc/openvpn/
sudo -u tunnel openvpn /etc/openvpn/openvpn.conf

Otherwise I get this error:
ERROR: Cannot ioctl TUNSETIFF tun0: Operation not permitted (errno=1)

Often I get this error after the commands i wrote above too. Only half of the time the VPN works. How to debug this?

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Contributors] [Investors] [Priority Support] [Professional Support]