Wireguard GUI client in Ubuntu <= 21.10 using network manager plugin

NOTE: this is broken in Ubuntu 22.04. See bug: github.com/max-moser/net… . Ubuntu 22.04 has wireguard built into the normal Network Manager GUI.

# instal dependencies
sudo apt install wireguard git dh-autoreconf libglib2.0-dev intltool build-essential libgtk-3-dev libnma-dev libsecret-1-dev network-manager-dev resolvconf

#  clone repo and build
git clone https://github.com/max-moser/network-manager-wireguard
cd network-manager-wireguard
./autogen.sh --without-libnm-glib

./configure --without-libnm-glib --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/NetworkManager --localstatedir=/var

make   
sudo make install

##From: https://github.com/max-moser/network-manager-wireguard

From: albe.app/2021/05/08/wire… (No longer reolves)

Wireguard GUI client in Ubuntu
ALBERT ROSADO 05-08-2021 gui, gui client, linux, ubuntu, vpn, wireguard
Intro
Setting up a Wireguard GUI client in Linux, is pretty frustrating. After a long time spent trying different things, I finally was able to set it up using Ubuntu’s native network manager. And decided to write a guide to explain all the steps I took in the simplest possible manner.

Notes
I tested this guide in all versions of Ubuntu after 20.04.
You need a config file or all the necessary configuration data from your server or VPN provider. I set up my Wireguard server using the self-hosted solution Algo VPN. My wireguard-client.conf configuration file contains all the required data for the client to connect to my server and it looks like this (yours will be different):
1
2
3
4
5
6
7
8
9
10
[Interface]
PrivateKey = 8kjsayero983yur3ou89324KJDHF9283re2edi2h3reh3Q=
Address = 10.34.12.2/24
DNS = 171.23.168.60

[Peer]
PublicKey = 8234yNWHD&FYY@843yr2e920jediM#(U$RJFiwjefijd=
PresharedKey = L@I&$Rj98234ujemf89l3eh8hewmlH*!#@$HFLD<J=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = 1.231.44.22:51820


I’m assuming you are running the official flavor of Ubuntu (Gnome). KDE has the network manager plugin for Wireguard already installed (at least in the most recent versions), if you are using KDE then you can skip to the Configuration section.
Installation
Open the Terminal, and copy/paste this command:
1
sh -c “$(wget git.io/J35w3 -O -)”
This command will install the network manager Wireguard plugin for you, It will prompt you for a password, enter your login password and press Enter.

Once it finish the installation. Reboot your computer and log back in.
Configuration
We are almost done, now, go to Settings -> Network. On the VPN section, click on the + sign, and you should see Wireguard as an option.

When you choose Wireguard then you see another windows like this one:

Now fill all the fields with the data from your configuration file, for both the Interface and Peer section. Note that the names match, so just copy/paste each field into its corresponding input box. You can optionally rename your configuration instead of keeping the name VPN 1.

Click Add, and that’s it! Now you see the connection in your VPN section, turn it on, and verify your connection is working and your IP have changed, you can do so by going to whatismyipaddress.com or any similar site.

If you have any problem setting this up in your system, just drop a comment down below. I will try my best to help you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.