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.
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