You are not logged in.

#1 2024-05-08 21:42:27

icelord
Member
Registered: 2024-04-10
Posts: 31

Openvpn says that there is no tun, but there is.

So I start openvpn as usual and I get this:

ERROR: Cannot open TUN/TAP /dev/net/tun: No such device (errno=19)

Then I check /dev/net/ and there it is:

tun

I don't even know where to start.

Offline

#2 2024-05-08 23:31:10

loqs
Member
Registered: 2014-03-06
Posts: 18,868

Re: Openvpn says that there is no tun, but there is.

How do you start openvpn?  If you start a service that could use a separate namespace or sand boxing that would prevent it seeing /dev/net/tun on the host.

Offline

#3 2024-05-09 11:46:07

icelord
Member
Registered: 2024-04-10
Posts: 31

Re: Openvpn says that there is no tun, but there is.

I am using Hack The Box VPN so I follow their instructions and:

sudo openvpn starting_point_bla_bla_bla

This always works so I don't know why the case could have been different this time?

Well anyway, It runs fine now but it would be nice to know why this happend.
Could this be a problem on openVPN's side? It fixed itself without a pacman -Syu.

Offline

#4 2024-05-09 12:44:12

loqs
Member
Registered: 2014-03-06
Posts: 18,868

Re: Openvpn says that there is no tun, but there is.

icelord wrote:

Well anyway, It runs fine now but it would be nice to know why this happend.

What fixed it?

Offline

#5 2024-05-09 19:25:14

icelord
Member
Registered: 2024-04-10
Posts: 31

Re: Openvpn says that there is no tun, but there is.

I am not sure, I just booted up my PC this morning and It worked.

Offline

#6 2024-05-09 19:39:01

loqs
Member
Registered: 2014-03-06
Posts: 18,868

Re: Openvpn says that there is no tun, but there is.

Possibly a kernel module mismatch that was fixed by the reboot?

Offline

#7 2024-05-10 12:05:26

icelord
Member
Registered: 2024-04-10
Posts: 31

Re: Openvpn says that there is no tun, but there is.

Interesting, have you had any run-ins with something like this?

Offline

#8 2024-05-10 22:35:06

loqs
Member
Registered: 2014-03-06
Posts: 18,868

Re: Openvpn says that there is no tun, but there is.

Never encountered "No such device (errno=19)" when the device node is there.

Offline

#9 2024-06-28 13:10:35

reloadedd
Member
Registered: 2023-07-06
Posts: 14

Re: Openvpn says that there is no tun, but there is.

Just happened to me also. I've ran

pacman -Syu

which, among others, also upgraded my kernel. Since my laptop is mostly on sleep when I don't use it, the upgrade happened a few days ago and I've encountered the issue today. After rebooting, the issue went away.

Last edited by reloadedd (2024-06-28 13:11:04)

Offline

#10 2024-06-28 13:14:33

cryptearth
Member
Registered: 2024-02-03
Posts: 2,104

Re: Openvpn says that there is no tun, but there is.

reloadedd wrote:

Just happened to me also. I've ran

pacman -Syu

which, among others, also upgraded my kernel. Since my laptop is mostly on sleep when I don't use it, the upgrade happened a few days ago and I've encountered the issue today. After rebooting, the issue went away.

although there's nothin wrong with devices in deep low power modes instead of complete powered down - as arch does not yet support kernel live hot patching it's a good idea of rebooting asap after a kernel update

Offline

#11 2024-10-10 13:23:39

reloadedd
Member
Registered: 2023-07-06
Posts: 14

Re: Openvpn says that there is no tun, but there is.

Although I bit late, now I saw @cryptearth's comment and that seems to be the reason. Everytime I upgrade the kernel, connecting to VPN no longer works. After a reboot, everything is back to normal.

Offline

#12 2024-10-10 14:01:14

cryptearth
Member
Registered: 2024-02-03
Posts: 2,104

Re: Openvpn says that there is no tun, but there is.

as for the reason:
along with the kernel also the kernel modules are updated - and a given kernel can only load modules compiled for it
when pacman updates the kernel it installs the new modules and also deletes the current ones
now when the current kernel tries to load the tun/tap modules it can't do so because they no longer exist
solution: reboot the system after a kernel update so the kernel and modules match again

side note: although not required for most software it's a good idea to reboot after update anyway - otherwise tge current running binaries and additional data they losely depend one can drift as far apart as causing segfaults, coredumps or even kernel panics
so if you do on update per day it depends on what got updated
if you do an update once a week I recommend always reboot as even one week can cause issues
same goes for any long update intervals
if you want to not do reboots you have to look careful what can be updated without a reboot and what does require a reboot

Offline

Board footer

Powered by FluxBB