WireGuard Kernel Integration and What It Actually Means for Ubuntu 20.04 LTS 'Focal Fossa'

In a recent reddit post, I was asked the following by u/55abhilash:

Is wireguard already integrated in the kernel shipped with Ubuntu 20.04? If yes, what steps do we need to skip if it is already integrated in the kernel? I am assuming apt install wireguard used to build the wireguard kernel module. Since it is already built in the kernel now, we need not do apt install wireguard in 20.04, just need to install wireguard tools. Is my understanding correct?

https://engineerworkshop.com/blog/how-to-set-up-a-wireguard-vpn-server-on-ubuntu-linux/

I thought this was a great question since there seems to be a lot of confusion over WireGuard’s integration into the Linux kernel and what that actually means for Ubuntu 20.04 LTS ‘Focal Fossa’.

WireGuard only just made it into Linux kernel 5.6, while Ubuntu’s latest 20.04 LTS currently ships with 5.4. Normally, the lack of a module in the kernel would require that you use dkms to load the required module (in this case WireGuard) and indeed, installing WireGuard on other Debian-based operating systems, such as Raspbian (Debian Buster), on the Raspberry Pi, resulted in WireGuard pulling in wireguard-dkms as a dependency:

In contrast, wireguard-dkms is not pulled in as a dependency in Focal Fossa:

Nonetheless, the output of lsmod | grep wireguard does confirm that the WireGuard is nonetheless loaded in LTS 20.04:

Regardless, this question is largely an academic one since no deviation from the instructions in my guide for installing WireGuard on Ubuntu is necessary as apt install wireguard will pull in the necessary dependencies (in this case only wireguard-tools). I prefer to rely on the default Ubuntu repository whenever possible.The inclusion of WireGuard in both the official Ubuntu repository and in the Linux kernel is most meaningful in that it signifies both Canonical’s and the Linux kernel’s commitment to this VPN.

tl;dr: u/55abhilash’s understanding is correct.

-TorqueWrench

1 Like