Score:2

Can't add WireGuard VPN connection to Ubuntu Network Manager

ke flag

I'm having trouble adding a WireGuard VPN connection to the Network Manager on Ubuntu. I've followed several online tutorials and tried different methods, but nothing seems to work.

I've installed WireGuard using the sudo apt install wireguard command and created the configuration file /etc/wireguard/wg0.conf . The VPN connection works fine when I start it using the sudo wg-quick up wg0 command, but I can't seem to add it to the Network Manager.

When I go to "Add VPN Connection" in the Network Manager, I only see options for OpenVPN and PPTP. There's also an option to "Import from file", but when I select my wg0.conf file, it says that the file format is not supported.

I've tried restarting the Network Manager with sudo service network-manager restart , but that doesn't seem to help. I'm running Ubuntu 22.04.1 LTS.

Any help or suggestions would be greatly appreciated. Thanks in advance!

Score:1
us flag

Install wireguard

$ sudo apt install wireguard

Create a Cryptographic Key Pair

$ sudo -i
# cd /etc/wireguard
# umask 077
# wg genkey | tee /etc/wireguard/privatekey | wg pubkey | tee /etc/wireguard/publickey

Add Client Public Key to WireGuard VPN Server

# wg set wg0 peer <client-public-key> allowed-ips <client-VPN-address>

Create a Network Connection with NetworkManager's Connection Editor GUI Heading

Using nm-connection-editor's GUI as described here.

UbuntuAskz avatar
ke flag
Create a Network Connection with NetworkManager's Connection Editor GUI Heading Assume you are able to do that... Thats what I am trying to understand how to do. I can't find anywhere that I can add it to the VPN list.
jasmines avatar
us flag
https://www.xmodulo.com/wireguard-vpn-network-manager-gui.html
FedKad avatar
cn flag
... and support for **GNOME Settings (Network Panel)** is probably going to come in Ubuntu 23.04: https://9to5linux.com/gnome-44-beta-released-with-quick-settings-enhancements-wireguard-support
bitinerant avatar
bd flag
You can clone and build `network-manager-wireguard` manually for 22.04: https://peerchemist.medium.com/how-to-setup-wireguard-vpn-on-ubuntu-server-22-04-c329434aed12
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.