1

For a long time now I had an AWS Lightsail VPS serving as a wireguard gateway to my home server. Since recently connection 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 still the same.
The port I use for wireguard has not changed and still is accessible according to the Network settings in Lightsail.
What change in the Lightsail VPS (automatic updates?) or Network settings can cause this? Especially since I did not change anything, it just stopped working over night.

1

Nevermind, AWS Lightsail had automatically updated the Linux kernel. Therefor the wireguard-dkms module was out of date. The problem was not specific to Lightsail but rather a common issue when using the wireguard-dkms module.
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
1
  • thank you for this, I had the same exact issue and this solved it!
    – rioc0719
    Feb 25 at 4:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.