Siduction Forum

Siduction Forum => Software - Support => Topic started by: GoinEasy9 on 2020/04/16, 16:33:46

Title: Wireguard install
Post by: GoinEasy9 on 2020/04/16, 16:33:46
Hi All 

Has anyone tried setting up Wireguard yet? Right now I'm trying to see if I can set it up using a freshly installed siduction LXqt on my old EEEpc 1015px. While I'm sure there are other distros where the 5.6 kernel is available, it seems siduction and Tumbleweed are the only ones that I've used where it is now default. 
 
Unfortunately, sid hasn't moved beyond a 5.5 kernel, so, dkms and wireguard-dkms are pulled in when installing wireguard (wireguard-dkms is a dependency). Since they're not needed with a 5.6 kernel, would removing dkms prevent the compiling of the old wireguard kernel module, or, won't it compile if the module hasn't been used previously? 
 
Also, LXqt uses connman to setup its network connections, and, I see that wireguard-vpn might be needed in order for the VPN to work.   
 
I'm still looking at videos and reading the wireguard website, but, if anyone has any hints or instructions they can share, I'd appreciate it. 
 
Thanks in Advance 
Tom 
Title: Re: Wireguard install
Post by: devil on 2020/04/16, 19:19:59
Hi Tom,

been using WireGuard for ~ 2.5 years, but have not installed it since 5.6 is in siduction. I have installed it in Ubuntu 20.04 last week and will be playing with it more on the weekend, as I am writing an article on how to set it up with 5.6 being around. Ubuntu only installs wireguard and wireguard-tools in version 1.0.20200319-1ubuntu1. sid installs version 1.0.20200319-2 and as long as there is no 5.6 in sid it will continue installing the -dkms package also. You could try to remove the -dkms package and see what happens. It looks like it is not a dependency.

As to wireguard-vpn, there seems to be no package of that name anywhere that I can find.
Title: Re: Wireguard install
Post by: GoinEasy9 on 2020/04/16, 20:45:33
Thanks devil, 

Sorry for the confusion, it was not wireguard-vpn, it was connman-vpn. This is the same as the openSUSE connman-plugin-wireguard. Different distros, same application, different names.I got confused while typing. 
 
I tried removing wireguard-dkms and it wanted to take wirequard with it, same when trying to remove dkms. dkms is listed in wireguard's build-depends, and, wireguard-dkms is listed as a depends for wireguard in the debian packages database. I've also noticed that wireguard and wireguard-tools have the same source code in Debian.   

It's interesting, with Tumbleweed, which only has a 5.6 kernel, installs all of wireguard by installing wireguard-tools, which brings in wireguard, but, wireguard is not a stand alone application that can be installed separately. 
 
Thanks again devil. Guess I'll play with it some more.
Title: Re: Wireguard install
Post by: devil on 2020/04/16, 20:58:46
You could play with Ubuntu 20.04, no -dkms there.
Title: Re: Wireguard install
Post by: GoinEasy9 on 2020/04/16, 22:30:53
Thanks devil, I'm downloading it right now.
Title: Re: Wireguard install
Post by: GoinEasy9 on 2020/04/22, 05:29:52
Just an FYI   
 
I downloaded the wireguard source from here:   
   
Code: [Select]
https://salsa.debian.org/debian/wireguard.git  
   
When I did a make/make install, it did not have any dependencies. So no dkms or wireguard-dkms.
Title: Re: Wireguard install
Post by: devil on 2020/04/30, 13:50:26
You might want to look at Mistborn [1]. It includes WireGuard, Pi-hole and about 10 other services like Nextcloud, Syncthing. Onlyoffice, Jellyfin and others. The developer is very approachable and did an amazing job. I wrote an article on Mistborn and could squash some early bugs with him.

[1]: https://gitlab.com/cyber5k/mistborn
Title: Re: Wireguard install
Post by: GoinEasy9 on 2020/04/30, 16:27:43
Thanks devil   

I git cloned it and will look at it in more detail later ... when the coffee starts working. :) It looks interesting. 

Tom
Title: Re: Wireguard install
Post by: evencarn on 2020/05/30, 18:58:31
Hi, I wasnt sure whether to start a new thread or not but I havent been able to get Wireguard running since kernel 5.5.8. Every kernel since then gives me an error that I cannot for the life of me google my way out of.
Here is the error on 5.6.13-towo.1-siduction-amd64, and its like this on every kernel until I go back to 5.5.8-towo.1-siduction-amd64, where it connects and works successfully as expected.
I've tried with and without dkms but to no avail, and have even reinstalled the whole OS and it all works fine until I update the kernel. Can anyone help me out here?
Ive been running wireguard on Siduction for a couple of years myself without serious issues before. Thanks
Code: [Select]
root@siduction:~# wg-quick up wg0[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 192.168.2.6/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -6 route add ::/0 dev wg0 table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] nft -f /dev/fd/63
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] nft -f /dev/fd/63
/dev/fd/63:5:1-99: Error: Could not process rule: No such file or directory

[#] resolvconf -d wg0 -f
[#] nft -f /dev/fd/63
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] ip -6 rule delete table 51820
[#] ip -6 rule delete table main suppress_prefixlength 0
[#] ip link delete dev wg0]
Title: Re: Wireguard install
Post by: turborat on 2020/05/31, 19:43:29
I think everybody jumped this ship!
That sucks . . . it was my favorite distro for years.
Title: Re: Wireguard install
Post by: turborat on 2020/05/31, 20:45:35
Disregard my last post.
I made a mistake on false info.
Just did an update and all is well.
Title: Re: Wireguard install
Post by: evencarn on 2020/06/04, 18:41:53
re my comment above, and if anybody else reads this, the standard Debian kernel 5.6.0-2 works fine so it looks like it's the siduction kernel that's at fault.
Title: Re: Wireguard install
Post by: devil on 2020/06/05, 19:50:50
Worked perfectly fine with siduction 5.6 kernel for me a while ago. DKMs is deprecated for this case since 5.6, when WireGuard moved into the kernel.
Title: Re: Wireguard install
Post by: devil on 2020/06/05, 19:51:42
@turborat: We are alive and kickin', just in Corona hiatus:)
Title: Re: Wireguard install
Post by: evencarn on 2020/06/05, 23:50:50
@devil Hi, it stops working for me on 5.5.9 so I dont think its because Wireguard entered the kernel. I've tried every kernel release since then but none of them worked for me. As I said earlier though the regular Debian kernel works fine at the moment 5.6.0-2.
I guess it could be my own machine (Lenovo x230), perhaps a hardware problem, because trying the latest Liquorix kernel just ended in a whole string of errors and wouldnt even boot :)
Title: Re: Wireguard install
Post by: devil on 2020/06/06, 23:07:43
I have tried WireGuard within a project on an X220 and an X230, but that was not siduction but Ubuntu 20.04 which has WireGuard backported from 5.6 into their kernel 5.4. Worked fine on both (one as server, one as client).
Title: Re: Wireguard install
Post by: evencarn on 2020/06/13, 15:50:26
Hi devil, just to let you know, I installed Arch on the x230 (5.7.2-zen1-1-zen) and wireguard works fine so I think its something amiss in the 5.5.9 siduction kernels onward. I installed siduction-patience-nox-amd64-latest on another partition, upgraded and then tried to install wireguard but the meta-package wanted to pull in an RT kernel and headers. I had tried with the RT kernel previously so didnt bother and just installed wireguard-tools but still got the same error as I posted above '/dev/fd/63:5:1-99: Error: Could not process rule: No such file or directory'.
Which I think may be related to permissions though that's just a guess ;)
Ive tried 4 different 5.6+ kernels now on this machine and they all work except the Siduction ones
Title: Re: Wireguard install
Post by: devil on 2020/07/05, 09:45:56
I have published an article in the latest Linux-Magazine on setting up WireGuard (still behind paywall) [1].
@evencarn: sorry, I still did not find the time to try this with siduction. As soon as I do, I'm sure we can find a solution.

[1]: https://www.linux-magazine.com/Issues/2020/237/WireGuard