For a long time now I run an AWS Lightsail VPS serving as a wireguard gateway to my home server. Since recently connecting to the Lightsail instance via wireguard is no longer possible.
When I took a look with SSH I got
$> sudo wg-quick up wg0 [#] ip link add wg0 type wireguard RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported [#] ip link delete dev wg0 Cannot find device "wg0"
To be sure I updated all packages, but the problem still persisted.
The port used by wireguard had not changed and still was accessible according to the network settings of Lightsail.
What change in the Lightsail VPS or network settings could cause an issue like this? It literally just stopped working over night.
However, as it turned out, AWS Lightsail had automatically updated the Linux kernel on my VPS. Therefor the
wireguard-dkms module was out of date. The problem was not specific to Lightsail, but rather presents a common issue when using the
Which makes me wonder, why the Lightsail VPS still depends on a kernel module for wireguard and isn’t using an up-to-date Linux kernel which has wireguard support integrated. It’s a Lightsail thing I guess.
To make wireguard work again, the headers for the new kernel version must be installed, so the
wireguard-dkms module can be rebuild/installed successfully.
$> apt update
$> apt install linux-headers-$(uname -r)
$> apt install --reinstall wireguard-dkms
$> wg-quick up wg0
Leave a Reply