Wireguard in Kernel used in ramips master build?

Good morning,

I have tried to find an answer to this question, but unfortunately it seems to be difficult...
I need a VPN server on dlink dwr 921 c3 and I am wondering if I should use OpenVPN or Wireguard.
(building targets/ramips/mt7620/...-ramips-mt7620-dlink_dwr-921-c3-squashfs-factory.bin)

Regarding the kernel version of the master built I see that
https://buildbot.openwrt.org/master/images/builders/ramips/mt7620/builds/502/steps/kernelversion/logs/property%20changes

the kernel version is 5.4.72.

Now my question is: Is wireguard included in this kernel that is included in the ramips mt7620 build?

Cheers, Martin

WireGuard is preferable for better performance and easier configuration.

1 Like

If you're asking whether wireguard will be in a default build then the answer is no. You'd have to either create your own build environment and add it to the build, use the image builder, or install wireguard after you've flashed the router. But the installed package is a kernel module.

1 Like

The point is: If WireGuard is in the linux kernel that is used in the master build (my own build) then I choose this one. If not, I can choose any package...
In the 19.07.4 branch build the kernel is too old anyways...

Are you sure, this is also the case for the master build? (https://buildbot.openwrt.org/master/images/builders/ramips%2Fmt7620)

Also, the documentation says that Wireguard is "running in the kernel" as a module
And it says that it does require to install the luci packages, but not the regular WireGuard package.

Overall, I am thinking about the news, that WireGuard was included in the linux kernel in the first quarter of 2020.

Cheers, Frood

So, you still need to install it manually.

Yes. But if you're building your own build why not just try it out? Build without adding kmod-wireguard and see if you have wireguard once you install. Then go back and build again with kmod-wireguard.

Ok, this is why I like to ask questions.... and this is the piece I was missing:
"kmod-wireguard" is actually a kernel module but in openwrt it is treated in the same way as a package.

So the answer is:
If I do build the master, I need to add the package
kmod-wireguard
to my .config but I dont need to add the package
wireguard

correct?

This is a metapackage that you use to easier build/install dependencies:
https://openwrt.org/packages/pkgdata/wireguard
There's no files, only metadata.

Ok but if I want to check / to see if the wireguard stuff is running as a module inside of the kernel (the only reason for me to choose wireguard) is to enable the module in the config and to see if it works out. Right?
The wireguard package itself is also working / compiling when I choose an older version and not master.
Or how can I verify that? This was actually the initial question: is wireguard included in the kernel in a master build for rampis?

The module is compiled but not preinstalled.
You can install it with opkg if you plan to use snapshot builds.

my understanding from the news in march 2020 was that the wireguard stuff is all included, preinstalled, existing in the kernel - but I am everything else than a linux / kernel expert :slight_smile:

I was always using OpenVPN and I am used to OpenVPN - so I was unsure if I need to switch to Wireguard now and if I should also build master for a productive environment (with the LTE router).

But it seems like there is no difference between 19.07 with kernel 4.x or master and kernel 5.x running wireguard in a kernel module.

Yes, the WireGuard code is included in the kernel.

No, the WireGuard kernel module is not preinstalled by default.
You need to install it with opkg or use a custom build.

Both OpenVPN and WireGuard should work good enough.
But you may want to use WireGuard for better performance.

Does it mean that

  1. The documentation is incomplete https://openwrt.org/docs/guide-user/services/vpn/wireguard/start
    (It says that only luci packages are required (this was my understanding, if the kernel includes everything else))
    or
  2. The installation of the luci packages also pull the depending kmod and tool packages?

Cheers, Frood

Number 2 is correct

1 Like

Each package on that page is linked to the respective package-info page which lists its dependencies.