You are not logged in.
I set up OpenVPN with a commercial provider yesterday, and it worked well for a few hours. I was able to set up the systemd service and make it autostart, but today the TUN/TAP device is disabled.
`ls /dev/net` returns nothing, even when run as root, and `openvpn /path/to/config` fails with a warning about a missing TUN/TAP, (immediately after reboot) but `modprobe tun` actually activates the module without errors. However, this doesn't persist between reboots. `dmesg` doesn't show anything related to tun until I run `modprobe`, so I don't know what could have changed to affect it.
I'm using the standard Arch kernel and recently updated my system, so I'm unsure what's causing the lack of initialization. Is there a way I can force it to load the module or something similar?
EDIT: While this doesn't address the root problem, adding `tun` to MODULES in `mkinitcpio.conf` has gotten it to work; I'd still like to understand why it stopped working
Last edited by idlepork (2019-12-27 03:16:32)
Offline
The first obvious step is to check whether /boot/vmlinuz (or whatever) was properly updated - it looks like kernel version does not match with drivers in /usr/lib/modules/, so you cannot load tun module. This issue is partially addressed by adding 'tun' to initramfs - because during boot that version of driver is loaded from initramfs, not from /usr/lib/modules/ (just a guess).
Offline
I checked in /usr/lib/modules and found a 5.3.3 kernel folder, which I deleted (it only contained the kernel config). /usr/lib/modules contains a folder labeled with 5.4.6 and `strings /boot/vmlinuz` similarly returned 5.4.6-arch3-1. So it appears that they are of the same version, and looking at dmesg again, I think this might be a systemd issue (because it loads kernel modules according to dmesg).
Based on this post https://stackoverflow.com/questions/460 … by-systemd and the linked wiki page https://wiki.archlinux.org/index.php/Mo … udev_work?, it looks like it has something to do with udev not detecting it or something (which is weird considering it's a virtual interface). Looking at the modalias file in /usr/lib/modules, I see a tun alias, and in /usr/lib/udev/rules.d, 50-udev-default.rules has
KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tunso the issue doesn't appear to be in udev's config, but for some reason it's not being loaded and `initramfs` is just forcing it into the kernel.
My HOOKS in mkinitcpio are
(base udev autodetect modconf block filesystems keyboard resume fsck)and if that's missing anything critical to load udev, it would be explained. Could I need to add a `systemd` hook, or does that fulfil some other purpose?
Offline