Wireguard VPN - How to fix Operation not supported if it worked before?

Viewed 22447

Trying to get up my VPN interface with sudo wg-quick down wg0;sudo wg-quick up wg0 raised:

RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported

I am not sure what happened but the only thing I did was reboot. I did not update my packages. Still something apparently changed.

3 Answers

In my case there were no appropriate kernel headers installed.

First you need to know your current kernel version:

# uname --kernel-release
4.19.0-14-cloud-amd64

Important part here is "cloud-amd64" (there are several versions of "linux-headers-..." package, use apt list linux-headers-* to see what is available).

Then install appropriate kernel headers (I'm using Debian):

# apt install linux-headers-cloud-amd64

Then re-install wireguard-dkms package:

# apt install --reinstall wireguard-dkms

Reboot your OS:

# reboot

In my case (Debian 10, PiVPN) i had to:

  1. Install linux headers:
apt-get update
apt-get install linux-image-amd64 linux-headers-amd64
  1. reboot
  2. apt reinstall wireguard-dkms
  3. reboot

Running apt update / upgrade revealed that there are wireguard updates available. Install those (you might have to reboot as well) and all will work fine again.

Secure boot as the internet suggests was a false trail in my case.

Related