WireGuard on a Raspberry Pi

Installing WireGuard – a state-of-the-art VPN – on a Raspberry Pi 2B turns out to be troublesome.

It was smooth just at the beginning:

  • Add debian unstable source
# /etc/apt/sources.list.d/unstable.list

deb https://mirrors.ustc.edu.cn/debian/ unstable main
  • Configure apt preference
# /etc/apt/preferences.d/limit-unstable

Package: *
Pin: release a=unstable
Pin-Priority: 90
  • Update Raspberry Pi kernel
sudo rpi-update
  • Install Linux Headers
sudo apt install raspberrypi-kernel-headers
  • Install WireGuard
sudo apt install wireguard
  • Clone WireGuard source code
git clone https://git.zx2c4.com/WireGuard

But when I tried to run the client script:

sudo WireGuard/contrib/examples/ncat-client-server/client.sh

BOOM!!

RTNETLINK answers: Operation not supported

According to StackExchange, I need to compile the kernel and customize the configuration to get iproute2 to work.

Sigh. Add it to the TO-DO list.