Jump to content


Photo

Request for WireGuard VPN implementation

WireGuard VPN

  • Please log in to reply
107 replies to this topic

Re: Request for WireGuard VPN implementation #41 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 21 April 2020 - 17:06

It's about speed :)

 

The kernel module is really fast.

 

The userspace implementation is not considered so fast, that's why Cloudflare created BoringTUN, using rust.

 


Clearly we thought, only one of those fits the bill, and that is wireguard-go.

However, benchmarks quickly showed that wireguard-go falls very short of the performance offered by the kernel module.

This is because while the Go language is very good for writing servers, it is not so good for raw packet processing, which a VPN essentially does.

 

We can always create the userspace (once we move to zeus) and provide the kernel for supported machines as well.


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Request for WireGuard VPN implementation #42 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 25 April 2020 - 19:02

Indeed if the only serious advantage is speed, the user space implementation won't be that interesting compared to OpenVPN.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Request for WireGuard VPN implementation #43 cmatte

  • Senior Member
  • 33 posts

0
Neutral

Posted 24 October 2020 - 22:25

Attempting WG install on vuduo4k on 7.3, gets stuck at the instructions:

ip link add dev wg0 type wireguard
ip: RTNETLINK answers: Operation not supported

Attempting to install linux-libc-headers-dev as required, the link doesn't work - is there something we can do?

wget: server returned error: HTTP/1.1 404 Not Found
Collected errors: * opkg_download_backend: Failed to download http://downloads.openpli.org/feeds/openpli-7-release/armv7ahf-neon/linux-libc-headers-dev_4.10-r0.2_armv7ahf-neon.ipk, wget returned 1. * opkg_install_pkg: Failed to download linux-libc-headers-dev. Perhaps you need to run 'opkg update'?
Installing linux-libc-headers-dev (4.10) on root
Downloading http://downloads.openpli.org/feeds/openpli-7-release/armv7ahf-neon/linux-libc-headers-dev_4.10-r0.2_armv7ahf-neon.ipk.

Edited by cmatte, 24 October 2020 - 22:28.


Re: Request for WireGuard VPN implementation #44 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 24 October 2020 - 22:39

https://www.ivpn.net...-supported.html ?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #45 cmatte

  • Senior Member
  • 33 posts

0
Neutral

Posted 24 October 2020 - 23:34

Good to try. Many other answers point towards installing your kernel headers, so tried but the link seems dead on the OpenPLI feed.

modprobe wireguard
modprobe: ERROR: could not insert 'wireguard': Unknown symbol in module, or unknown parameter (see dmesg)

dmesg

[ 5432.403153] wireguard: Unknown symbol udp_sock_create4 (err 0)
[ 5432.409019] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[ 5432.415348] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[ 5432.421812] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[ 5432.428090] wireguard: Unknown symbol udp_sock_create6 (err 0)
[ 5432.433976] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)

Edited by cmatte, 24 October 2020 - 23:38.


Re: Request for WireGuard VPN implementation #46 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 24 October 2020 - 23:49

It looks like it is dependent on other modules that aren't loaded.

 

What does

modinfo wireguard

say?

 

On my Duo 4K

root@vuduo4k:/proc/stb# modinfo wireguard
filename:       /lib/modules/4.1.45-1.17/kernel/wireguard/wireguard.ko
alias:          net-pf-16-proto-16-family-wireguard
alias:          rtnl-link-wireguard
version:        1.0.20200413
author:         Jason A. Donenfeld <Jason@zx2c4.com>
description:    WireGuard secure network tunnel
license:        GPL v2
srcversion:     244479A3BBFD73C5413F2F5
depends:        ipv6
vermagic:       4.1.45-1.17 SMP mod_unload ARMv7 p2v8 

it depends only on ipv6, which is loaded:

root@vuduo4k:/proc/stb# lsmod
Module                  Size  Used by
bthid                   2977  0
btusb                  51979  1
bluetooth             389128  4
ipv6                  288680  71
brcmfb                  1467  2
dvb_bcm7278          2013332  39 brcmfb
dvb_base             5867819  5 dvb_bcm7278
bcm_event               2899  5 dvb_bcm7278
procmk                  2104  2 dvb_bcm7278,bcm_event
dhd                   179617  0

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #47 cmatte

  • Senior Member
  • 33 posts

0
Neutral

Posted 25 October 2020 - 14:22

Same results for both, ipv6 dependency, ipv6 is loaded indeed, are you getting anything different from a:

modprobe wireguard

or the 

ip link add dev wg0 type wireguard

?



Re: Request for WireGuard VPN implementation #48 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 25 October 2020 - 15:18

Same problem here:

root@vuduo4k:~# modprobe wireguard
modprobe: ERROR: could not insert 'wireguard': Unknown symbol in module, or unknown parameter (see dmesg)

I've checked, "udp_sock_create4" is a method introduced in Kernel v4.2, and my Duo4K runs 4.1.45. So there is an issue with the out-of-tree build of wirehguard.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #49 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 25 October 2020 - 17:57

Is it still not in the kernel, or added after 4.2?

 

Having out-of-kernel modules is always a PITA, I hate it.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Request for WireGuard VPN implementation #50 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 25 October 2020 - 19:15

It is in the kernel for 5.8+, it is added out-of-tree for earlier kernels (by Athoik), but appearently that doesn't work, at least not on kernels < 4.2.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #51 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 25 October 2020 - 20:55

I suggest first to enable CONFIG_NET_UDP_TUNNEL and try again.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Request for WireGuard VPN implementation #52 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 25 October 2020 - 22:45

That would require a BSP change, so we need to check all defconfig's ?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #53 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 26 October 2020 - 05:01

Hi,

It seems that UDP tunnel as module (=m) is enough on osmio4k with kernel 5.5.16.

...

[/code]There are 70 boxes that need CONFIG_NET_UDP_TUNNEL=m, few already have it.

grep -r "CONFIG_NET_UDP_TUNNEL is not set" meta-* | wc -l
70

Yes, there are many boxes without udp tunnel.

Better to check on a custom build, if building above module will fix issue on VU+ as well.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Request for WireGuard VPN implementation #54 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 26 October 2020 - 13:22

Changed it to

CONFIG_NET_UDP_TUNNEL=y

build a new kernel, and flashed the box.

 

No difference:

[  284.512010] wireguard: Unknown symbol udp_sock_create4 (err 0)
[  284.517873] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[  284.524238] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[  284.530706] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[  284.536988] wireguard: Unknown symbol udp_sock_create6 (err 0)
[  284.542872] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #55 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 26 October 2020 - 13:36

Hmm, I expected a module "udp_tunnel" on the box, but lsmod doesn't show it.

 

edit: according to https://cateee.net/l...UDP_TUNNEL.html, it should work. I see it's only available from v3.18 onwards, so we should update the kernel check too (now builds from 3.14).


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #56 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 26 October 2020 - 14:42

I've cleaned the kernel, changed the kernel defconfig to

CONFIG_NET_UDP_TUNNEL=m

but no kernel module is created?

 

edit: Required files are present in the kernel source:

$ find . -name "*udp_tunnel*"
./net/ipv4/udp_tunnel.c
./net/ipv6/ip6_udp_tunnel.c

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #57 rantanplan

  • PLi® Contributor
  • 1,805 posts

+83
Good

Posted 26 October 2020 - 15:40

https://www.wireguard.com/compilation/

 

 

Building Directly In Tree

Probably the easiest way to patch it in general



Re: Request for WireGuard VPN implementation #58 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 26 October 2020 - 16:00

Yeah, saw that too, we'll have to do that conditionally though, only for kernels > 3.18 and < 5.8.

 

In the meantime I've found that the kernel build tree contains a .config and .config.old file. The old file is my original defconfig, the .config file is modified somewhere:

714c709
< CONFIG_NET_UDP_TUNNEL=m
---
> # CONFIG_NET_UDP_TUNNEL is not set
2611a2599
> CONFIG_MEDIA_TUNER_TDA18250=m
2614d2601
< CONFIG_MEDIA_TUNER_TDA18250=y

so WTF is changing my defconfig?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #59 WanWizard

  • PLi® Core member
  • 68,559 posts

+1,737
Excellent

Posted 26 October 2020 - 16:55

Found it, it also requires

CONFIG_GENEVE=m

and that fixes it:

root@vuduo4k:~# modprobe udp_tunnel
root@vuduo4k:~# modproble wireguard
root@vuduo4k:~# 

next step: see how to get all the BSP's updated...
 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Request for WireGuard VPN implementation #60 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 27 October 2020 - 19:18

Maybe something for 8.1?


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users