Linux users keep running into the same wall: foreign services stop working. GitHub crawls, Spotify won't play, ChatGPT is unreachable. The fix is a VPN with DPI bypass. AmneziaWG is natively supported on Linux through a WireGuard-compatible kernel.
This guide covers installing and configuring AmneziaWG on the most popular Linux distributions.
Ways to install AmneziaWG on Linux
There are a few approaches:
- AmneziaWG client (official) — a graphical desktop application.
- amneziawg-tools — a command-line utility similar to wg-quick.
- Patched WireGuard — standard WireGuard plus extra kernel modules.
- NetworkManager plugin — manage it from your network manager's GUI.
Ubuntu / Debian: install via apt
Step 1: add the repository
sudo apt install software-properties-common
sudo add-apt-repository ppa:amnezia/ppa
sudo apt update
Step 2: install the packages
sudo apt install amneziawg amneziawg-tools
Step 3: copy the config
The @vpn_plan_b_bot bot gives you a .conf file. Save it as /etc/amneziawg/planb.conf:
sudo mkdir -p /etc/amneziawg
sudo cp planb.conf /etc/amneziawg/
sudo chmod 600 /etc/amneziawg/planb.conf
Step 4: start the VPN
sudo awg-quick up /etc/amneziawg/planb.conf
Step 5: verify the connection
sudo awg show
curl ifconfig.me
Fedora / RHEL / CentOS
sudo dnf install amneziawg-tools
sudo cp planb.conf /etc/amneziawg/
sudo chmod 600 /etc/amneziawg/planb.conf
sudo awg-quick up /etc/amneziawg/planb.conf
Arch Linux / Manjaro
sudo pacman -S amneziawg-tools
sudo cp planb.conf /etc/amneziawg/
sudo chmod 600 /etc/amneziawg/planb.conf
sudo awg-quick up /etc/amneziawg/planb.conf
Start the VPN automatically on boot
To bring the VPN up automatically when the system starts:
Systemd (Ubuntu, Debian, Fedora, Arch)
sudo systemctl enable awg-quick@planb.service
sudo systemctl start awg-quick@planb.service
Check the status
sudo systemctl status awg-quick@planb.service
Managing the VPN
Connect
sudo awg-quick up /etc/amneziawg/planb.conf
Disconnect
sudo awg-quick down /etc/amneziawg/planb.conf
Status
sudo awg show
Watch data transfer
sudo awg show planb transfer
Split tunnelling for individual apps
If you don't want all traffic to go through the VPN but only specific applications, use ip route and cgroup:
# Route only Firefox through the VPN
sudo cgexec -g net_cls:browser-only \
sudo -u youruser firefox
Or through a namespace:
# Create a separate namespace with the VPN
sudo ip netns add vpn-only
sudo ip link set planb netns vpn-only
sudo ip netns exec vpn-only firefox
Using it with NetworkManager
To manage the VPN graphically from the system tray:
sudo apt install network-manager-amneziawg
sudo systemctl restart NetworkManager
After that you can toggle the VPN from the network manager GUI and import the config with nmcli:
nmcli connection import type awg file /path/to/planb.conf
nmcli connection up planb
DNS over VPN
The Plan B config sets the DNS servers automatically. If you'd rather use your own (Cloudflare, Quad9):
# Add to the config
DNS = 1.1.1.1, 9.9.9.9
Kill switch: blocking traffic outside the VPN
To make sure traffic never bypasses the VPN (protection against leaks):
# Add to the config
PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -j REJECT
PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -j REJECT
Traffic monitoring
Keep an eye on your VPN usage:
# Current traffic
watch -n 1 'sudo awg show planb transfer'
# Connection logs
journalctl -u awg-quick@planb.service
# Full statistics
sudo awg show all
Common problems
awg-quick won't start
Check that the config is in the correct format:
sudo cat /etc/amneziawg/planb.conf
sudo awg-quick strip /etc/amneziawg/planb.conf
DNS doesn't work
Disable systemd-resolved or configure it:
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
sudo rm /etc/resolv.conf
echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
No ping through the VPN
Check your firewall:
sudo iptables -L -v
sudo ufw status verbose
Alternative Linux clients
Besides the standard AmneziaWG, there are other clients:
- AmneziaVPN — the official GUI client with extra features.
- WireGuard — the standard client with the Amnezia patch.
- NetworkManager-amneziawg — network manager integration.
- KDE Plasma Network Manager — GUI for KDE.
- GNOME Network Manager — GUI for GNOME.
Conclusion
Installing AmneziaWG on Linux takes about 10 minutes. Once configured, the VPN comes up automatically on boot and runs reliably. Plan B provides DPI bypass and a stable connection for Linux users from 59 ₽/mo.
Related articles: "AmneziaWG vs WireGuard" and "Setting up a VPN on Windows and macOS".