Question about "wireguard-tools", and the setup of Wireguard VPN

Hello everyone,
I am trying to setup a wireguard connection after a clean install.
I have never had to setup a VPN connection myself, because, until now, I only used KDE and there has always been an “import connection” button (I use Mullvad VPN btw).
I decided to go with XFCE this time, but there is no “import connection” button.

So I tried to go through the hardships of setting it up myself, and I first looked if I needed any packages, there seemed to be the package “wireguard-tools” that could be useful and which I installed. But I am know not even sure, that this is the correct first step.

I also noticed, that although the package was showed to me in yast, there does not seem to be an official package for it here:
https://software.opensuse.org/package/wireguard-tools?search_term=wireguard-tools

Why is that so? I am pretty sure, not to have checked a checkmark for any nonofficial repos during the install. Is the packages I installed even needed? It does not seem to have the right number either and I am unable to track down the original package, can you explain me why I cannot find an official package for Leap 5.15 and why it is shown in Yast?

Is there any simple way to import a VPN-connection in xfce or do I have to go through there the hard way and use the cli? If so, can you give me some advice or links to get me started, the documentation I read up to now was not always clear and never specific to SUSE and I am a bit scared to go through it.

Thank you for your advice.

If you look at the “Versions” tab in YaST, you’ll see that the package is in the main repository. That will be the definitive place to look, rather than searching software.opensuse.org.

Here’s what my 15.5 system shows:

The info for the package shows:

jhenderson@localhost:~> zypper if wireguard-tools
Loading repository data...
Reading installed packages...


Information for package wireguard-tools:
----------------------------------------
Repository     : Main Repository
Name           : wireguard-tools
Version        : 1.0.20200827-5.9.1
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 140.7 KiB
Installed      : No
Status         : not installed
Source package : wireguard-tools-1.0.20200827-5.9.1.src
Upstream URL   : https://www.wireguard.com/
Summary        : WireGuard userspace tools
Description    : 
    WireGuard is a novel VPN that runs inside the Linux Kernel and uses
    state-of-the-art cryptography (the "Noise" protocol). It aims to be
    faster, simpler, leaner, and more useful than IPSec, while avoiding
    the massive headache. It intends to be considerably more performant
    than OpenVPN. WireGuard is designed as a general purpose VPN for
    running on embedded interfaces and super computers alike, fit for
    many different circumstances. It runs over UDP.

    This package contains command-line tools to interact with the
    WireGuard kernel module.  Currently, it provides only a single tool:

    wg: set and retrieve configuration of WireGuard interfaces

So it comes from the main OSS repo.

The tools provided by this package are command-line tools.

From the standpoint of how to configure using XFCE (which I don’t use), I would look to see if you use NetworkManager or Wicked for managing network connections - whichever of those you use should have some options for configuring some types of VPN connections - looking at the VPN configuration in GNOME (which uses NetworkManager in my case), I see Wireguard as an option. Can’t say that I’ve configured it, though, as I do use Wireguard, but only for connecting Android devices to my router when I’m away from home.

1 Like

XFCE uses connman as connection mangager. That means you need the connman-plugin-wireguard plugin for connman. As connman is a CLI tool and does not follow common setting file formatting, it is not possibible to directly import VPN settings as far as i know. You need to put the settings from your VPN manually into the connman setting file. There are tutorials/guides available (google search).

There is also a GUI for connman available econnman. Maybe this one allows a more convinient way to import VPN settings…

It is known that http://software.opensuse.org/ does not properly show packages for Leap 15.5. But as hendersj explained, you should first search via YaST software or zypper search before using external tools…

1 Like

You can do it with CLI and I do not consider it a “hard way”.

man nmcli

nmcli connection import type wireguard file wg-quick.conf

wireguard-tools is not needed to configure WireGuard connection in NetwotkManager. wireguard-tools is certainly useful to troubleshoot issues with WireGuard connection as long as you are not afraid of CLI.

3 Likes
bor@leap15:~> grep PRETTY_NAME /etc/os-release
PRETTY_NAME="openSUSE Leap 15.5"
bor@leap15:~> echo $XDG_SESSION_DESKTOP 
xfce
bor@leap15:~> zypper se -t package  -x connman
Loading repository data...
Reading installed packages...

S | Name    | Summary            | Type
--+---------+--------------------+--------
  | connman | Connection Manager | package
bor@leap15:~> 
1 Like

wireguard-tools package includes a script wg-quick to quickly enable/start a wireguard config/interface.

Config files should be in /etc/wireguard/<interface-name>.conf IIRC.
Starting it is as simple as wq-quick up <interface-name>.

Manapge:
https://man7.org/linux/man-pages/man8/wg-quick.8.html

Of course using NM would be better overall as it’s the default connection manager in OpenSuse.

1 Like

I didn’t knew that!

Thank you all for your posts, I learned more about all this and I was able to setup everything!

Command line seems sometimes scarier than it is or needs to be! Thank you all!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.