Failed to resolve interface "tun": No such device

cn flag

I'm trying to use wireguard, but when I try to use it with wg-quick up I get the error.

wg-quick up test
Warning: `/etc/wireguard/test.conf' is world accessible
[#] ip link add test type wireguard
[#] wg setconf test /dev/fd/63
[#] ip -4 address add dev test
[#] ip -6 address add fd::29/128 dev test
[#] ip link set mtu 1395 up dev test
[#] resolvconf -a tun.test -m 0 -x
Failed to resolve interface "tun": No such device
[#] ip link delete dev test

As I checked other's questions I found out that I don't have 'tun.ko.gz' (`find /lib/modules/ -iname 'tun.ko.gz'` returns nothing), so I can't load the 'tun'.
$ uname -r
> 5.11.0-40-generic

I'm using Ubuntu 20.04

ru flag
Include the full error output and any other output related to it into your question as an edit, there's likely other information we still need to help with this in the error output.
Kurosh Ghanizadeh avatar
cn flag
@ThomasWard I've added the full error, but I'm not familiar with these things, so I'll be glad to know what information you need.

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.