Score:0

Problem with WireGuard/tun module after updating Kubuntu to 22.10

tj flag

After updating my kubuntu (after that I rebooted my device) to 22.10 from 22.04 I am unable to run the wire guard:

sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.77.28.148 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
Failed to resolve interface "tun": No such device
[#] ip link delete dev wg0 

I'm assuming that since WireGuard was working with the previous version of the operating system, its configuration is correct (but maybe it's a wrong assumption...), so I guess there is a problem with the tun module. When I try to check this module with lsmod | grep 'tun' I doesn't see output for it. sudo modprobe tun doesn't change anything. I also can't find the tun.ko.gz in the /lib/modules/ directory, I only see qrtr-tun.ko.

modinfo tun returns:

name:           tun
filename:       (builtin)
alias:          devname:net/tun
alias:          char-major-10-200
license:        GPL
file:           drivers/net/tun
author:         (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
description:    Universal TUN/TAP device driver

grep "CONFIG_TUN" -r /usr/src returns:

/usr/src/linux-headers-5.19.0-23-generic/.config:CONFIG_TUN=y

If you need any more information, please let me know. Also, sorry if anything that I provide above is irrelevant, this topic is quite new to me.

David avatar
cn flag
Have you checked the WireGuard web site to see if 22.10 is supported?
heynnema avatar
ru flag
Place your wireguard script into /etc/wireguard/tun0.conf, and use `sudo wg-quick up tun0`. See `man wg-quick` or `man wg`.
Score:1
mw flag

I've had the same problem. It seems to be a problem with the update(r) to Ubuntu 22.10 (my system was on 22.04).

I was able to fix it executing sudo apt purge resolvconf

Please note that I don't know if this could cause additional problems, but it worked for getting wireguard running again. Ubuntu is using systemd-resolved and normally resolvconf should only be a "link" to systemd-resolved.

Additional information may be found here.

Removing the DNS declaration in your .conf file will work to, but this is not an acceptable solution if you want to use a custom DNS server over wireguard.

Score:0
cn flag

In my wg0.conf file, I commented out the DNS line (because I don't like deleting anything if I can help it) and then added

PostUp = resolvectl dns %i *DNS IP ADDRESS*

to the end of my interface block

Score:-1
ao flag

Comment or remove your DNS key in wireguard client config file

Example

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.