You are not logged in.

#1 2017-10-16 09:30:41

oeut1341
Member
Registered: 2016-06-09
Posts: 23

OpenVPN cannot open tun on startup

I've an OpenVPN configured to connect on startup by using the "openvpn-client" service. Ever since past week (11th) it fails to connect on startup:

ERROR: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
Exiting due to fatal error

If I restart it manually once I'm logged in then it works fine, so it's not a problem in the VPN configuration.

Package updates on the 10th, i.e., one day previous to the error appearing for the first time:

[2017-10-10 22:32] [ALPM] upgraded libsystemd (234.11-9 -> 235.0-1)
[2017-10-10 22:32] [ALPM] upgraded pambase (20130928-1 -> 20171006-1)
[2017-10-10 22:32] [ALPM] upgraded device-mapper (2.02.174-2 -> 2.02.175-1)
[2017-10-10 22:32] [ALPM] upgraded systemd (234.11-9 -> 235.0-1)
[2017-10-10 22:32] [ALPM] upgraded libmatroska (1.4.7-1 -> 1.4.8-1)
[2017-10-10 22:32] [ALPM] upgraded thin-provisioning-tools (0.7.2-1 -> 0.7.3-2)
[2017-10-10 22:32] [ALPM] upgraded lvm2 (2.02.174-2 -> 2.02.175-1)
[2017-10-10 22:32] [ALPM] upgraded mkvtoolnix-cli (15.0.0-2 -> 16.0.0-1)
[2017-10-10 22:32] [ALPM] upgraded mkvtoolnix-gui (15.0.0-2 -> 16.0.0-1)
[2017-10-10 22:32] [ALPM] upgraded systemd-sysvcompat (234.11-9 -> 235.0-1)

Could this be a bug in systemd 235.0-1? Especially considering the service file contains the following line:

DeviceAllow=/dev/net/tun rw

Offline

#2 2017-10-16 11:49:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: OpenVPN cannot open tun on startup

What happens if you rollback to 234.11-9 to test your hypothesis?

EDIT: I can tell you that openvpn is working for me under the repo version of systemd on Arch ARM with no modifications.

Last edited by graysky (2017-10-16 12:32:38)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2017-10-16 20:55:15

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: OpenVPN cannot open tun on startup

Yes. I can confirm this. And other issues related to network interface not available on bootup. In some machines happens more or less.

https://github.com/systemd/systemd/issues/7103

Offline

#4 2017-10-17 10:19:28

oeut1341
Member
Registered: 2016-06-09
Posts: 23

Re: OpenVPN cannot open tun on startup

Yup, rolling back to 234.11-9 fixes it.

Offline

#5 2017-10-17 19:57:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: OpenVPN cannot open tun on startup

I wonder how our setups are different.... my openvpn server is running using systemd-235.0-1.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2017-10-17 23:01:07

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: OpenVPN cannot open tun on startup

Well my openvpn-server is not affected, my other machine with -client yes. And in other machine my dnsmasq is affected. And at this time the workaround of enabling systemd-networkd log-debug, does not work like old times.

If you run a service with "networkctl" to show status or "ip addr" you can see how unpredictable is systemd-networkd from 235.

Offline

Board footer

Powered by FluxBB