Avnet / smartedge-iiot-gateway

Source code used for Avnet Raspberry Pi Industrial Gateway
Other
11 stars 10 forks source link

How to run Wireguard VPN ? #5

Closed ccooll closed 4 years ago

ccooll commented 4 years ago

Hi All,

I have been trying to make wireguard working, and it seems the kernel is not "ready" for it. Using debian strech unstable packages, I have been able to install the tools. I thought I had also installed (auto-magically compiled) the kernel modules, but here is the output that I have.

sudo wg-quick up wg0 [#] ip link add wg0 type wireguard RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported [#] ip link delete dev wg0 Cannot find device "wg0"

I have not tried yet using buster image instead, but if I cannot add specific kernel modules, I believe I would loose my time trying to install buster, when I only want is Wireguard to work.

Maybe if I could just recompile the kernel and update the image, it would do. I am just unsure on how to proceed. (From Wireguard's website, https://www.wireguard.com/compilation/, I need to make sure I have :

Has anyone had any success with such a thing. I could not understand the process in the documentation?

Thanks for your help,

ccooll commented 4 years ago

Finally, I found out how.

By recompiling the kernel, as mentioned in the documentation, using the same cross-compiler, I was able to manage it. But, the .dtb file was not compiled by default and it gave me a bit of trouble. I also had to re-use the same bt-blob.bin file, as I was not able to reproduced it, but it was ok.

Before compiling the kernel, I followed the patch information from the wireguard source file. This was the easiest way to get it done.

It would be nice if you could update your README files and documentation to clarify how to produce the different files needed. There is only some instruction on the zImage, and it generally says to genrate the other ones without explanations.

Anyway, I got it to works. Thanks