WireGuard with Mullvad VPN on UNIX-like Systems
Posted 2024-10-11, last edited 2024-10-11
Overview
- What is WireGuard?
- What is Mullvad VPN?
- WireGuard and Mullvad VPN
- Additional Resources
- Closing Notes
This guide assumes you know the basics of using the command line! If you're unsure about how to use the command line, read my guide here.
What is WireGuard?
"WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. 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. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry."
Quote from WireGuard.com
\_ What is a VPN?
In the simplest terms, a VPN reroutes your traffic to a different location in the world, and encrypts your traffic at the same time. Meaning, if you choose, say, France, but you're from Italy, all of your traffic will be seen as though it's all from France instead of Italy.
What is Mullvad VPN?
Mullvad is a Swedish VPN service that has set the standard of privacy regarding VPNs, by insisting on not spying on it's users, and even letting users pay anonymously via snail mail. Neither an email address nor a name is even required to sign up! It's all done under a randomized account number.
WireGuard and Mullvad VPN
\_ Installing WireGuard
WireGuard and Mullvad work wonderfully together. First thing we need to do is install WireGuard on our system.
On Void Linux:
# xbps-install -S wireguard-tools
On Alpine Linux:
# apk add wireguard-tools-wg-quick
On Gentoo Linux:
# emerge -av wireguard-tools
On Arch-based Linux Distros:
# pacman -S wireguard-tools
On OpenBSD
# pkg_add wireguard-tools
Now you should have the wg-quick command!
\_ Generating a Configuration File
Next thing we need to do is generate a config file through Mullvad:
- Go to Mullvad.net
- Click Get started in the top right corner
- Follow the on-screen instructions
- Click on Account in the top right corner, once you've created an account and added time to it
- Click WireGuard configuration in the left panel
- Generate a new key
- Select a country, city and server
- (optional) Enable multihop and select another country, city and server
- Configure content blocking to your liking
- Download the file
\_ "Installing" the Configuration File
To "install" the file we just downloaded, we need to move the file to the correct directory:
# mv FILENAME.conf /etc/wireguard/
Now we can connect to the server using wg-quick:
# wg-quick up FILENAME
Now you should be connected to a Mullvad server via WireGuard! Go to Mullvad.net/en/check to check your connection.
NOTE: When you replace FILENAME with the name of the file you downloaded previously, make sure to omit .conf extension!
To disconnect from a server:
# wg-quick down FILENAME
To see what server you're currently connected to:
# wg show
That's it!
Additional Resources
Closing Notes
Thank you for reading this blog post!
Was this useful? Perhaps.