WireGuard VPN Setup in XFCE
Managing WireGuard Connections in XFCE/KDE
Section titled “Managing WireGuard Connections in XFCE/KDE”Setting up a WireGuard VPN on XFCE is straightforward using the default network management stack. Since XFCE relies on NetworkManager for its network configuration, you can import and manage your WireGuard tunnel directly through the network-manager-gnome applet (the system tray network icon) or via the command line using nmcli.
Here is how to add your WireGuard .conf file to NetworkManager on an XFCE desktop.
Method 1: using gnoppix-vpn
Section titled “Method 1: using gnoppix-vpn”gnoppix-vpn is a wizzard application developed by Gnoppix Linux. We’ve created a easy-to-use wizard that automates these manual steps. Just launch gnoppix-vpn from the application menu or the command line, import your configuration file, and you are good to go
gnoppix-vpnMethod 2: Using the NetworkManager GUI
Section titled “Method 2: Using the NetworkManager GUI”This is the most visual method and integrates directly into the XFCE panel.
-
Open Network Connections:
- Right-click the network icon in your XFCE status tray and select Edit Connections…
- Alternatively, open your Application Menu, search for Network Connections, and launch it.
-
Import the Configuration:
- Click the
+(Plus) button in the bottom left corner of the Network Connections window to add a new connection. - In the dropdown menu for the connection type, scroll down to the Virtual section and select Import a saved VPN configuration…
- Click Create…
- Click the
-
Select Your File:
- A file browser will open. Navigate to your WireGuard
.conffile, select it, and click Open.
- A file browser will open. Navigate to your WireGuard
-
Review and Save:
- NetworkManager will automatically parse the configuration, creating a new interface (usually named after your filename).
- Review the settings in the WireGuard and IPv4/IPv6 tabs if necessary.
- Click Save.
-
Connect:
- Left-click the network icon in your XFCE panel.
- Hover over VPN Connections and click on your newly imported WireGuard profile to activate it.
Method 3: Using the Command Line (nmcli)
Section titled “Method 3: Using the Command Line (nmcli)”If the GUI tool gives you any trouble or if you prefer a quick terminal command, NetworkManager’s command-line interface handles WireGuard imports perfectly.
-
Import the connection:
Terminal window sudo nmcli connection import type wireguard file /path/to/your/wg0.conf -
Bring the interface up:
Terminal window nmcli connection up wg0 -
Bring the interface down:
Terminal window nmcli connection down wg0
Troubleshooting & Tips
Section titled “Troubleshooting & Tips”-
Missing WireGuard Option: If NetworkManager doesn’t recognize the WireGuard file during import, make sure you have the necessary plugin installed:
Terminal window sudo apt install network-manager-wireguard -
DNS Leaks: If your VPN connects but your traffic isn’t routing correctly or you notice DNS leaks, open the connection properties in the GUI, go to the IPv4 Settings tab, change the Method to Automatic (DHCP) addresses only, and manually add your secure DNS servers in the DNS servers field.
-
Gnoppix DoH: Make sure you have enabled the Gnoppix DoH settings, which run by default on Gnoppix Linux. Generally, standard DNS settings are not encrypted, meaning anyone can see your DNS requests. With Gnoppix DoH, your DNS requests are fully encrypted with a secure layer.