Parrot Linux VPN Setup: WireGuard and OpenVPN

Whether you want to protect traffic on public Wi-Fi, reach a home server from the road, or add a privacy layer on top of your daily browsing, a VPN belongs in your toolkit. This Parrot Linux VPN setup guide covers the two protocols that matter most today: WireGuard, which is fast and simple, and OpenVPN, which is older but still everywhere. Both run cleanly on Parrot Linux because it is Debian-based, so the same packages and commands you would use on Debian apply here.

WireGuard vs OpenVPN: which should you pick?

You do not have to learn both at once. Choose based on what you are connecting to.

  • WireGuard is modern, lean, and quick to configure. Its config files are short, it reconnects almost instantly after a network change, and it is a good default when you control both ends (your own VPS, your home router, or a provider that offers WireGuard).
  • OpenVPN is mature and widely supported. Many commercial VPN providers and corporate networks still hand out .ovpn files, so you will meet it whether you like it or not. It is more flexible but heavier to set up and slower to reconnect.

A VPN hides your traffic from the local network and your ISP, and changes your apparent IP address. It is not the same as Tor. If strong anonymity is your goal rather than a private tunnel to a server you trust, read about AnonSurf and the Tor Browser on Parrot Linux instead, and compare the trade-offs in Parrot Linux vs Whonix.

Set up WireGuard on Parrot Linux

WireGuard needs two things: the tools package and a configuration file. Install it with apt:

sudo apt update
sudo apt install wireguard wireguard-tools resolvconf

The resolvconf package lets WireGuard set DNS automatically from the config, which prevents DNS leaks. How you get your config depends on who runs the server.

Using a provider’s WireGuard config

If your VPN provider offers WireGuard, download the .conf file they give you. Place it in /etc/wireguard/ with a short name, for example wg0.conf:

sudo cp ~/Downloads/provider.conf /etc/wireguard/wg0.conf
sudo chmod 600 /etc/wireguard/wg0.conf

The chmod 600 matters because the file holds your private key. Bring the tunnel up and down with:

sudo wg-quick up wg0
sudo wg-quick down wg0

Check that it is working and inspect the handshake with:

sudo wg show

Generating your own keys for a self-hosted server

If you are connecting to your own Parrot Cloud Edition VPS, generate a key pair on each peer:

wg genkey | tee privatekey | wg pubkey > publickey

A minimal client config then looks like this, with your own keys and the server’s public key and address filled in:

[Interface]
PrivateKey = <your-client-private-key>
Address = 10.0.0.2/24
DNS = 1.1.1.1

[Peer]
PublicKey = <server-public-key>
Endpoint = your.server.ip:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25

Setting AllowedIPs = 0.0.0.0/0 routes all traffic through the tunnel. Use a narrower range if you only want to reach the server’s private network. To start the tunnel automatically at boot, enable the service:

sudo systemctl enable --now wg-quick@wg0

Set up OpenVPN on Parrot Linux

OpenVPN is the protocol you will meet when a provider or employer hands you a .ovpn file. Install the client and the NetworkManager plugin so you can also connect from the desktop:

sudo apt update
sudo apt install openvpn network-manager-openvpn-gnome

Connecting from the command line

The quickest way to test a config file is to run it directly. Keep the terminal open while connected:

sudo openvpn --config ~/Downloads/client.ovpn

You will usually be asked for a username and password. To avoid pasting credentials into a shared config, store them in a separate file referenced by auth-user-pass credentials.txt in the .ovpn, and lock that file down with chmod 600. Leave the terminal running; closing it drops the connection.

Connecting through the desktop

For a connection you use often, importing it into NetworkManager is cleaner. In the network settings, add a VPN and choose Import from file, then select your .ovpn. After that you can toggle the VPN from the system tray like any other connection, and it will prompt for credentials when needed.

Verify the tunnel and check for leaks

Connecting is only half the job. Confirm that your traffic is actually going through the VPN and that nothing leaks around it.

First, check your public IP before and after connecting:

curl ifconfig.me

The address should change to the VPN server’s once the tunnel is up. Next, confirm your DNS queries are not leaking to your ISP. A DNS leak means your IP is hidden but your ISP still sees every domain you look up. Make sure your config sets DNS to the VPN’s resolver (as the WireGuard DNS = line does), then test with an online DNS leak checker in your browser.

Finally, inspect the routing table to see where traffic is headed:

ip route

Add a kill switch so you fail closed

If the VPN drops, you usually want traffic to stop rather than silently fall back to your normal connection. This is a kill switch. The cleanest approach is to combine it with your firewall. Our Parrot Linux firewall guide covers nftables and ufw in depth; the idea is to allow outbound traffic only through the VPN interface (wg0 or tun0) and the VPN server’s endpoint, and block everything else.

For WireGuard specifically, wg-quick can add PostUp and PreDown firewall rules directly in the config, so the kill switch comes up and down with the tunnel. Test it by bringing the tunnel down and confirming that curl ifconfig.me fails instead of revealing your real IP.

Common problems and fixes

  • No internet after connecting: usually a DNS problem. Confirm resolvconf is installed for WireGuard, or that your .ovpn pushes DNS. Check /etc/resolv.conf while connected.
  • WireGuard handshake never completes: the server endpoint or port is wrong or blocked. Verify the Endpoint and that UDP 51820 (or your chosen port) is open on the server.
  • OpenVPN authentication fails: re-check the username and password, and make sure the credentials file has no stray blank lines.
  • Tunnel drops on network change: add PersistentKeepalive = 25 for WireGuard; for OpenVPN, the NetworkManager connection usually handles reconnects better than a raw terminal session.

FAQ

Is WireGuard or OpenVPN better for Parrot Linux?

For your own servers, WireGuard is simpler and faster. For connecting to providers or workplaces that only hand out .ovpn files, you will use OpenVPN. Many users keep both installed and pick per connection.

Does a VPN make me anonymous on Parrot Linux?

No. A VPN hides your traffic from the local network and shifts your IP, but the VPN operator can see your traffic. For anonymity rather than privacy, use Tor-based tools instead of, or on top of, a VPN.

Will the VPN start automatically at boot?

For WireGuard, enable wg-quick@wg0 with systemd as shown above. For OpenVPN through NetworkManager, you can mark the connection to connect automatically in its settings.