Trying Wireguard on Raspberry Pi failed with "RTNETLINK answers: Operation not supported"

Viewed 3601

Steps I tried

  1. I am trying to setup a Wireguard client on a Raspberry pi

This is the configuration on used

# /etc/wireguard/wg0-client.conf
[Interface]
Address = 10.10.0.4/32
Address = fd86:ea04:1111::4/128
SaveConfig = true
PrivateKey = CLIENT-PRIVATE-KEY
DNS = 8.8.8.8

[Peer]
PublicKey = SERVER-PUBLIC-KEY
Endpoint = SERVER-PUBLIC-IP:PORT
AllowedIPs = 0.0.0.0/0, ::/0
  1. After setup the Wireguard config, I run the sudo wg-quick up wg0-client, it fails like this
pi@raspberrypi:~ $ sudo wg-quick up wg0-client
[#] ip link add wg0-client type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0-client
Cannot find device "wg0-client"

the Wireguard server side has been working for a while with other devices, so I do not paste the info here

OS and hardware context

/etc/os-release info

pi@raspberrypi:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

/sys/firmware/devicetree/base/model for hardware info

Raspberry Pi 3 Model B Rev 1.2
1 Answers

I solved this the other day for my Pi-2 by removing Wireguard updating/upgrading the Kernel to the latest version, installing the Kernel headers, and reinstalling Wireguard. Worked like a charm after that.

But, you may only need the kernel headers. You can try doing "sudo apt-get install raspberrypi-kernel-headers" before anything else.

I'm on:

Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux

Related