Skip to content

Instantly share code, notes, and snippets.

@dcava
Created October 28, 2017 05:02
Show Gist options
  • Save dcava/e126a00ee8c65cbb1ca6db8efb803130 to your computer and use it in GitHub Desktop.
Save dcava/e126a00ee8c65cbb1ca6db8efb803130 to your computer and use it in GitHub Desktop.
Instructions to setup wireguard on Raspberry pi 2/3 and get it working with streisand
# Install repo
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable
apt update
#unstall kernel sources headers (not sure if need both)
apt install libmnl-dev rbp2-headers-$(uname -r) rbp2-source-$(uname -r) build-essential pkg-config
#ln the build dir to kernel headers
ln /usr/src/rbp2-headers-`uname -r` /lib/modules/`uname -r`/build
#install iproute2
apt install iproute2 resolvconf
#install wireguard
apt install wireguard-dkms wireguard-tools
#follow streisand instructions
Download the client configuration file: (for your setup)
Set permissions on the client configuration file:
sudo chown -v root:root ~/Downloads/wg0-client.conf; sudo chmod -v 600 ~/Downloads/wg0-client.conf
Move the client configuration file into the correct directory:
sudo mv -i -v ~/Downloads/wg0-client.conf /etc/wireguard/
Use the wg-quick utility to bring up the WireGuard interface:
sudo wg-quick up wg0-client
For Linux systems using systemd you can also enable Wireguard at boot: (didn't work for me - installed but wouldnt bring up interface)
'sudo systemctl enable wg-quick@wg0-client.service'
To stop routing your traffic through WireGuard, simply bring the interface back down:
sudo wg-quick down wg0-client
@DirtHouse4lyf
Copy link

Pi:/home/osmc# ln /usr/src/rbp2-headers-uname -r /lib/modules/uname -r/build
ln: /usr/src/rbp2-headers-5.10.78-7-osmc: hard link not allowed for directory

How can I resolve this?

@dcava
Copy link
Author

dcava commented Dec 8, 2022

Hi,

Been a long while since I've used this, but try:
ln -s /usr/src/rbp2-headers-uname -r /lib/modules/uname -r/build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment