Guide
How to Set Up a VPN on Linux: App, NetworkManager or Terminal (Without DNS Leaks)
The easiest way to use a VPN on Linux is your provider’s own app. It brings the kill switch and leak protection that a connection you set up by hand doesn’t have.
Of the eight VPNs we re-reviewed in November 2026, seven have a Linux app with a proper window. CyberGhost’s runs in the terminal only. No app for your distro? You can still import the provider’s WireGuard or OpenVPN file into NetworkManager, or start it with one command. Then two gaps are yours to close: there is no kill switch, and DNS or IPv6 traffic can slip past the tunnel.
Checked on the providers’ and projects’ own pages on 29 November 2026. New to VPNs? Start with what a VPN does and doesn’t hide.
Which VPNs have a real Linux app
A few years ago a Linux app often meant a command-line tool and a shrug. That has changed. NordVPN launched its graphical app in April 2025, and since version 5.3.0 in August 2026 it installs together with the command-line daemon. ExpressVPN, Surfshark, PIA, Proton VPN, Mullvad and Amnezia VPN have windowed apps too. CyberGhost is the holdout: its Linux app is a terminal tool, and for distros it doesn’t support, its help pages walk you through a manual OpenVPN setup in NetworkManager.
“Has a Linux app” doesn’t mean “has the same app as on Windows”. The gaps that matter:
- Surfshark has no split tunnelling on Linux. Its Flatpak build, the verified one on Flathub, has no kill switch either. The kill switch is only in the .deb and Snap packages.
- NordVPN splits traffic only by port or subnet (its Allowlist), not by app. It has also had IPv6 support on hold since version 4.0.0 in June 2025, citing WebRTC leak risks.
- CyberGhost supports IPv4 only and tells Linux users to turn off IPv6 themselves. Its help pages list no kill switch, split tunnelling or obfuscation for Linux.
- Proton VPN leaves the kill switch off until you turn it on. Its Advanced mode then blocks the internet whenever the VPN is down, including at startup and shutdown. Split tunnelling needs a paid plan, and the Free plan does work in the Linux app.
- Mullvad’s kill switch can’t be switched off. Lockdown mode, off by default, extends the block to the time you are disconnected.
Five of the eight apps are open source: NordVPN’s, PIA’s, Proton VPN’s, Mullvad’s and Amnezia’s. On Linux that is worth more than elsewhere. A VPN app runs a background service that rewrites your routing and firewall rules, and with the code public, anyone can check what it does. ExpressVPN, Surfshark and CyberGhost keep theirs closed.
Install the app
How you install depends on the provider, not much on your distro.
A repository. NordVPN, Surfshark, Proton VPN and Mullvad add their own package repository, so the app updates with the rest of your system. NordVPN’s install script works with apt, dnf and zypper; Proton VPN gives you a small repository package to install first; Mullvad has apt and dnf repositories, stable or beta. Surfshark covers Debian-family distros only, and also offers Snap and Flatpak.
One installer file. ExpressVPN, PIA and Amnezia VPN give you a single .run file that works on every distro they support. You download it, run it from the terminal and enter your password. CyberGhost sends a ZIP file from your account with an install.sh inside.
Some install pages ask you to run a script straight from the vendor’s server. That looks worse than it is. You are about to send all your traffic through this company; running its installer is the smaller act of trust.
Three things catch people out:
- Community packages aren’t the vendor’s. The AUR packages for NordVPN, ExpressVPN, Surfshark and Amnezia VPN are made by volunteers. Proton VPN and Mullvad are in Arch’s own repository, but maintained by others, and Mullvad says outright that it supports only Ubuntu, Debian and Fedora.
- Flathub’s Proton VPN isn’t Proton’s. Flathub marks com.protonvpn.www as a community package that Proton doesn’t support. Surfshark’s Flatpak is verified, but has no kill switch (see above).
- Versions. Most providers support only recent releases. Mullvad and ExpressVPN need Ubuntu 24.04 or later, and NordVPN dropped Ubuntu 20.04, Debian 11 and Fedora 32 to 42 in August 2026. On an older install, the manual routes below still work.
No app? Import the file into NetworkManager
NetworkManager, the network tool on most desktop distros, can run WireGuard and OpenVPN connections itself. You need two things from your provider’s website: a configuration file and, for OpenVPN, a separate username and password.
WireGuard files come from Mullvad’s configuration generator, Proton VPN’s Downloads page, Surfshark’s manual setup (it creates a key pair for you) and NordVPN’s account page. PIA offers WireGuard only through its own setup scripts. ExpressVPN and CyberGhost offer OpenVPN files for manual setups.
- Give the file a short name, 15 characters at most before
.conf, such asse-sto.conf. NetworkManager names the connection after the file, and a Linux network interface name can’t be longer. A long file name is the usual reason an import fails; Proton VPN gives the same advice. - Import it. On GNOME 44 or later: Settings › Network › VPN › + › Import from file. On any desktop, in a terminal:
nmcli connection import type wireguard file se-sto.conf - Connect from the network menu or with
nmcli connection up se-sto.
NetworkManager ignores the PostUp and PreDown lines of a WireGuard file. If you ticked the kill-switch option in Mullvad’s generator, that kill switch is gone after the import.
OpenVPN files (.ovpn) come from NordVPN, ExpressVPN, Surfshark, PIA, CyberGhost and Proton VPN. Mullvad switched OpenVPN off on 15 January 2026.
- Install the OpenVPN plugin:
network-manager-openvpn-gnomeon Debian and Ubuntu,NetworkManager-openvpn-gnomeon Fedora (plasma-nm-openvpnfor KDE),networkmanager-openvpnon Arch. - Import the .ovpn file in Settings › Network › VPN, or run
nmcli connection import type openvpn file your-file.ovpn - Enter the OpenVPN username and password from your account. At NordVPN, ExpressVPN, Surfshark, Proton VPN and CyberGhost these are separate from your login (NordVPN and Surfshark call them service credentials).
A connection set up this way has no kill switch. If the tunnel drops, your traffic carries on through your normal connection. Surfshark says as much about Ubuntu’s built-in VPN settings, in its own sales pitch for its app.
The terminal route: wg-quick or openvpn
On a server, or a desktop without NetworkManager, the tools themselves are enough.
WireGuard. WireGuard has been in the Linux kernel since version 5.6 (March 2020), so you only need the wireguard-tools package. Put the file in /etc/wireguard/, then:
sudo wg-quick up se-stostarts the tunnel,sudo wg-quick down se-stostops it.sudo systemctl enable --now wg-quick@se-stostarts it at every boot.
The DNS = line in the file is handed to resolvconf, so one has to be installed. On distros that use systemd-resolved, that is its resolvconf shim (a separate systemd-resolvconf package on Arch).
wg-quick has no kill switch of its own. Its manual page shows one built from two firewall rules, added to the [Interface] section:
PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
That example covers IPv4 only. Mullvad’s generator adds the same rules for IPv6.
OpenVPN. sudo openvpn --config your-file.ovpn connects and asks for the OpenVPN username and password. The trap is DNS. OpenVPN 2.6, the version in Debian 13, doesn’t apply the VPN’s DNS server on Linux by itself. Without a helper script your DNS queries keep going to your router, outside the tunnel. Install openvpn-systemd-resolved and point the config’s up and down lines at its update-systemd-resolved script (with script-security 2). OpenVPN 2.7 (February 2026, the version in Ubuntu 26.04) does this with a built-in script, unless your config already runs its own up script.
Check for leaks and close the gaps
A tunnel that is up isn’t the same as traffic that goes through it. Four checks, in this order:
- Is the tunnel up?
sudo wg showlists a recent “latest handshake” for WireGuard;nmcli connection show --activelists the VPN for NetworkManager connections. - Does traffic use it?
ip routeshould show the default route on the tunnel interface. Then runip -6 route: if IPv6 still has a default route over your Wi-Fi or Ethernet, IPv6 traffic bypasses an IPv4-only tunnel. - Which DNS server answers?
resolvectl statuslists the DNS servers per interface. The VPN’s server should be the current one, not your router’s. - What does a website see? Mullvad’s connection check lists the DNS servers your browser reaches and tests for WebRTC leaks.
IPv6 is the old leak that never quite went away. In a 2015 study of 14 commercial VPNs, Perta and colleagues found most of them leaked IPv6 traffic, Linux included, because it simply left through the normal network interface. Most apps now block or tunnel IPv6; PIA, Proton VPN, ExpressVPN and Mullvad say so. Manual connections don’t: if your file has no IPv6 address and your network has IPv6, turn IPv6 off for that connection, as Proton VPN advises for manual setups. Amnezia VPN is the exception that warns the other way: its docs say not to disable IPv6, or the Connect button stops working.
For a dropped tunnel, the fix is a kill switch: the app’s, the wg-quick rules above, or firewall rules of your own. Our kill switch guide explains what each kind covers. If the VPN connects but nothing loads, DNS is the usual suspect; our fixes for a VPN that won’t connect go through it step by step.
Raspberry Pi, Tails and other special cases
Raspberry Pi and ARM. NordVPN supports Raspberry Pi OS, with the windowed app on 64-bit ARM only. ExpressVPN supports the 64-bit Raspberry Pi OS. PIA dropped 32-bit ARM in July 2024, so an older 32-bit Pi needs a manual setup. Surfshark and Mullvad publish 64-bit ARM packages, while Proton VPN doesn’t support Raspberry Pi OS and Amnezia VPN builds for x86-64 only. On a 32-bit Pi, WireGuard through wg-quick is the simplest route.
Fedora Silverblue and other atomic distros. The system is read-only, so a vendor’s .rpm has to be layered with rpm-ostree install and a reboot (Fedora’s guide). Mullvad publishes the steps for Fedora Atomic but doesn’t support it.
Tails. Its FAQ says plainly that Tails does not work with VPNs. Tails sends everything through Tor. Our guide to using a VPN with Tails covers the workarounds and why the Tails team advises against them.
Qubes OS. Mullvad documents a WireGuard ProxyVM that the other qubes connect through, so one VPN covers several of them.
Servers without a desktop. ExpressVPN’s terminal tool works headless once you enable background mode. Proton VPN’s CLI doesn’t work without a desktop session yet. For a server, plain wg-quick with your provider’s WireGuard file is usually the least fuss.
Frequently Asked Questions
Some people found answers to these questions helpful
Do I need a VPN on Linux?
For the same reasons as anywhere else. Linux keeps malware off your computer better than most systems, but it changes nothing about what your internet provider or a café Wi-Fi can see. A VPN hides your traffic from the network and your IP address from websites; it doesn't make you anonymous. What a VPN does and doesn't hide has the details.
Does Linux have a built-in VPN?
It has the client parts: WireGuard has been in the kernel since version 5.6 (March 2020), and NetworkManager can run WireGuard and OpenVPN connections. It has no servers. You still need a VPN provider, or your own server; Amnezia VPN's app can set one up on a rented server for you.
Is there a free VPN for Linux?
Proton VPN's free plan works in its Linux app, with free servers in 10 countries and the kill switch included. A free plan from a known paid VPN is one thing. A free-only VPN from an unknown company that somehow pays for servers in dozens of countries is another, and we'd treat it as unsafe.
Should I use WireGuard or OpenVPN on Linux?
WireGuard, in most cases. It is built into the kernel and is the default in most Linux apps, and Mullvad no longer offers anything else. OpenVPN over TCP still helps on networks that block WireGuard, though Proton VPN says it is working toward dropping OpenVPN from its apps. Our WireGuard vs OpenVPN and TCP vs UDP guides compare them.
Will a VPN app work on Linux Mint, Kali or Arch?
Mint: NordVPN, ExpressVPN, Surfshark and PIA list it (Mint 21 or 22 and later, depending on the provider). Mint 27, due at Christmas 2026 on an Ubuntu 26.04 base, isn't on any list yet. Kali: no provider in our table supports it officially. Arch: ExpressVPN, PIA and Amnezia VPN support it; Proton VPN and Mullvad are in Arch's repository but maintained by others, and the rest come from community packages.
Why does NetworkManager refuse my WireGuard file?
Usually because of the file name. It becomes the network interface name, which can't be longer than 15 characters, so rename the file (for example se-sto.conf) and import it again. If it imports and connects but no website loads, check the DNS server with resolvectl status.
Can I use a VPN on a Steam Deck?
Yes, with care. SteamOS is read-only, and Valve warns that anything installed outside Flatpak may be wiped by a system update (Valve's FAQ). Surfshark's verified Flatpak survives updates but has no kill switch. Other apps need the read-only mode switched off and may need reinstalling after an update.