I’ve had this issue before, and now I have it again. I have no idea how to correct it properly.
I get this problem when I use systemctl to start openvpn, and also when I test it manually for debugging. To test manually I use:
openvpn --rmtun --dev tun0
openvpn --mktun --dev tun0 --dev-type tun --user tunnel --group tunnel
cd /etc/openvpn
sudo -u tunnel openvpn /etc/openvpn/openvpn.conf
This is an excerpt of openvpn’s output:
TUN/TAP device tun0 opened
Note: Cannot set tx queue length on tun0: Operation not permitted (errno=1)
do_ifconfig, tt->did_ifconfig_ipv6_setup=0
/usr/bin/ip_unpriv link set dev tun0 up mtu 1500
sudo: a password is required
Linux ip link set failed: external program exited with error status: 1
Exiting due to fatal error
What is causing this?
In the past I’ve used:
setcap cap_net_admin=epi /bin/ip
setcap cap_net_admin=epi /usr/sbin/openvpn
But this is not part of the instructions given here: Connecting to a VPN before Tor
I’ve been struggling with this for over a month now.