crazycat36
Posts: 1
Joined: Thu Feb 08, 2018 7:54 am

Wireguard server on Raspberry Pi

Thu Feb 08, 2018 7:58 am

I was wondering if there is any way to set up a raspberry pi to act as a VPN server with wireguard support? I was hoping for a link to a detailed set-up guide. Any help on the subject would be much appreciated. Thanks in advance.

Heater
Posts: 12614
Joined: Tue Jul 17, 2012 3:02 pm

Re: Wireguard server on Raspberry Pi

Thu Feb 08, 2018 1:12 pm

How about the wireguard documentation:

Installation : https://www.wireguard.com/install/

No raspberry pi package there but follow option b) and build it from source. They seem to have it running on a ton of other platforms so I'm confident it builds for raspbian.

Configuration: https://www.wireguard.com/quickstart/ They claim "easiest to use, and simplest VPN solution in the industry." So your trying that will be a good test of that claim.

Thanks for the heads up on wireguard. Looks promising.

1PoP
Posts: 1
Joined: Tue Aug 07, 2018 10:55 am

Re: Wireguard server on Raspberry Pi

Tue Aug 07, 2018 10:58 am

Doesn't work for me after setup:

[email protected]:~$ ip link add dev wg0 type wireguard
RTNETLINK answers: Operation not permitted

lwahonen
Posts: 1
Joined: Tue Aug 07, 2018 9:17 pm

Re: Wireguard server on Raspberry Pi

Tue Aug 07, 2018 9:18 pm

Hi,

You need to use have root powers to edit network settings, e.g. sudo ip link add dev wg0 type wireguard

Cheers,
will

WillBerriss
Posts: 8
Joined: Tue Jan 06, 2015 4:34 pm

Re: Wireguard server on Raspberry Pi

Sun May 19, 2019 3:24 pm

Note that to install the linux headers, the following suggested command won't work:

Code: Select all

sudo apt-get install linux-headers-$(uname -r)

Instead of that you need to do the following:

Code: Select all

sudo apt-get install raspberrypi-kernel-headers

DarrenHill
Posts: 224
Joined: Fri Oct 03, 2014 3:03 pm

Re: Wireguard server on Raspberry Pi

Sat May 25, 2019 4:51 pm

DietPi now has various server options with easy install, including Wireguard.

Set mine up a few weeks ago and working very well.

beta-tester
Posts: 1235
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wireguard server on Raspberry Pi

Sat Jun 29, 2019 1:00 pm

DarrenHill wrote:
Sat May 25, 2019 4:51 pm
DietPi now has various server options with easy install, including Wireguard.

Set mine up a few weeks ago and working very well.
you told, Wireguard is included to DiretPi.
i just installed the DietPi image to my RPi, but i can not find Wireguard to install...
how did you installed it?

the image is DietPi v6.24.1
i only can see OpenVPN, PiVPN, DietPi-NordVPN to install in DietPi-Software|VPN
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

DarrenHill
Posts: 224
Joined: Fri Oct 03, 2014 3:03 pm

Re: Wireguard server on Raspberry Pi

Sat Jun 29, 2019 1:41 pm

https://dietpi.com/phpbb/viewtopic.php?p=16308#p16308

For me it's item 172, at the bottom of the VPN list in dietpi-software.

This is under DietPi v6.24.1 : 14:43 - Sat 29/06/19

beta-tester
Posts: 1235
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wireguard server on Raspberry Pi

Sat Jun 29, 2019 5:33 pm

DarrenHill wrote:
Sat Jun 29, 2019 1:41 pm
https://dietpi.com/phpbb/viewtopic.php?p=16308#p16308

For me it's item 172, at the bottom of the VPN list in dietpi-software.

This is under DietPi v6.24.1 : 14:43 - Sat 29/06/19
i don't get it... i have the same image version as you.
but i don't have item 172 . item 171 is DietPi-NordVPN and 173 is something for the desktop or so...
but 172 does not existing on my list.
in case i am not up to date,i made

Code: Select all

apt full-upgrade
is it possibly because i am using a RPi1B rev.2 at the moment... ?
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

beta-tester
Posts: 1235
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wireguard server on Raspberry Pi

Sun Jun 30, 2019 5:45 am

beta-tester wrote:
Sat Jun 29, 2019 5:33 pm
is it possibly because i am using a RPi1B rev.2 at the moment... ?
yes it is... it is only available for CPUs with ARMv7 and higher:
see WireGuard not running on RPi 1 #2474

but you can compile and install WireGuard easely by hand:
see Install WireGuard on Raspberry Pi 1, 2 (not v1.2), Zero, Zero W
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

DarrenHill
Posts: 224
Joined: Fri Oct 03, 2014 3:03 pm

Re: Wireguard server on Raspberry Pi

Sun Jun 30, 2019 8:57 am

It all fits yes - mine's on a 3B.

harrypnyce
Posts: 1
Joined: Mon Jul 01, 2019 10:37 pm

Re: Wireguard server on Raspberry Pi

Mon Jul 01, 2019 10:46 pm

WillBerriss wrote:
Sun May 19, 2019 3:24 pm
Instead of that you need to do the following:

Code: Select all

sudo apt-get install raspberrypi-kernel-headers
I messed things up by installing Wireguard PRIOR to upgrading the linux-kernel-headers and now cannot seem to recover from this little dilemma. :oops: Any suggestions?

Code: Select all

raspberrypi-kernel-headers is already the newest version (1.20190620+1-1).
modprobe wireguard fails with the following message:

Code: Select all

modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.19.56-v7+
Running Raspbian GNU/Linux 10 Lite (buster) on a RPi3B+ with Linux kernel 4.19.56-v7+ -- all of my /lib/modules/ appear in the 4.19.50-v7+ folder, which has a symbolic link:

Code: Select all

/lib/modules/4.19.50-v7+/build -> /usr/src/linux-headers-4.19.50-v7+

DarrenHill
Posts: 224
Joined: Fri Oct 03, 2014 3:03 pm

Re: Wireguard server on Raspberry Pi

Tue Jul 02, 2019 10:49 am

Try

Code: Select all

dpkg-reconfigure wireguard-dkms
(from the DietPi documentation post on WireGuard here, the NB comment at the bottom).

Return to “Networking and servers”