Jump to content

Integrate WireGuard into kernel


AZ8

Recommended Posts

I don't know yet if this is the correct way to do a persistent change like this in Armbian, but the following seems to work for me:

  1. compile kernel once with CREATE_PATCHES="yes"
  2. apply WireGuard patch to kernel source when compile stops via WireGuard/contrib/kernel-tree/create-patch.sh | patch -p1
  3. save the resulting patch file in userpatches/kernel/rk3399-default/wireguard.patch to be reapplied next time

You would still have to add wireguard to the default kernel config for completely automatic compile, but as it is a new option you will be asked individually at compile time.

Link to comment
Share on other sites

Yeah you can integrate wireguard into the kernel, but you can also use DKMS framework to let it being recompiled each time a new kernel is installed.

Wireguard already comes with a small configuration file for DKMS, just follow a tutorial on how to install and setup DKMS on your machine (which is quite easy, just few steps) and register wireguard module and you're done.

Link to comment
Share on other sites

11 minutes ago, tpanum said:

Do any of you any documentation of how you managed to do this? I am struggling with this right now for my Odroid HC2 :-(


In case you need to install headers, use a method from armbian-config (generic will not work). Make sure to update your system before.

Link to comment
Share on other sites

29 minutes ago, Igor said:


In case you need to install headers, use a method from armbian-config (generic will not work). Make sure to update your system before.

 

I am in general struggling to get Wireguard up and running on any kind on armbian build on my Odroid HC2. Following the advice to use DKMS (based on this thread) haven't gotten me far... I'll try to install a clean armbian stretch on it now, following an `apt update && apt upgrade` and then install headers from `armbian-config`

 

Hopefully that will make it run properly.

 

I have described my issues in the following thread.

 

Link to comment
Share on other sites

On 12/11/2018 at 2:25 AM, AZ8 said:

WireGuard is a modern VPN service for Linux. For best performance it is requred to build WireGuard as kernel module (described at https://www.wireguard.com/install/)

 

Right now after each update of kernel of Armibian WireGuard stops work as new kernel has no compiled wireguard.ko module

 

Is it possible to integrate WireGuard to Armbian kernel?

 

OpenWRT 18.06 has pulled WG into their distro, and the numbers look really good compared to OpenVPN...

Link to comment
Share on other sites

4 hours ago, Igor said:

It's in by default. Now it will be in remaining kernels as well.

 

And that's a win - even distro's outside of Armbian are doing this...

 

It's got Torvald's thumbs up, and even embedded distros have picked it up....

 

WG on chips like AR9531 (MIPS 24K) are hitting good numbers here - WG is about half the bandwidth of the host interface - which is pretty good compared to OpenVPN...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines