Created
October 28, 2017 05:02
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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