Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  Wireguard install  (Read 6150 times)

Offline GoinEasy9

  • User
  • Posts: 560
Wireguard install
« 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 
Linux Counter number 348347

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: Wireguard install
« Reply #1 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.

Offline GoinEasy9

  • User
  • Posts: 560
Re: Wireguard install
« Reply #2 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.
Linux Counter number 348347

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: Wireguard install
« Reply #3 on: 2020/04/16, 20:58:46 »
You could play with Ubuntu 20.04, no -dkms there.

Offline GoinEasy9

  • User
  • Posts: 560
Re: Wireguard install
« Reply #4 on: 2020/04/16, 22:30:53 »
Thanks devil, I'm downloading it right now.
Linux Counter number 348347

Offline GoinEasy9

  • User
  • Posts: 560
Re: Wireguard install
« Reply #5 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.
Linux Counter number 348347

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: Wireguard install
« Reply #6 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

Offline GoinEasy9

  • User
  • Posts: 560
Re: Wireguard install
« Reply #7 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
Linux Counter number 348347

evencarn

  • Guest
Re: Wireguard install
« Reply #8 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]
« Last Edit: 2020/05/30, 19:05:52 by evencarn »

Offline turborat

  • User
  • Posts: 32
Re: Wireguard install
« Reply #9 on: 2020/05/31, 19:43:29 »
I think everybody jumped this ship!
That sucks . . . it was my favorite distro for years.

Offline turborat

  • User
  • Posts: 32
Re: Wireguard install
« Reply #10 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.

evencarn

  • Guest
Re: Wireguard install
« Reply #11 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.

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: Wireguard install
« Reply #12 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.

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: Wireguard install
« Reply #13 on: 2020/06/05, 19:51:42 »
@turborat: We are alive and kickin', just in Corona hiatus:)

evencarn

  • Guest
Re: Wireguard install
« Reply #14 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 :)