Skip to content

Mullvad Wireguard config with custom DNS

All credit to Michael Schnerring's guide.

  • Make sure you have < 5 Wireguard keys.
  • Install the official Wireguard client locally.
  • Create a new config. This generates a public/private key pair.
  • Run:
curl -sSL https://api.mullvad.net/app/v1/wireguard-keys \
  -H "Content-Type: application/json" \
  -H "Authorization: Token YOURMULLVADACCOUNTNUMBER" \
  -d '{"pubkey":"YOURWIREGUARDPUBLICKEY"}'
  • Get the public key and IPv4 address of your desired exit server from Servers | Mullvad VPN
  • Complete your config as follows:
[Interface]
PrivateKey = <private key>
Address = <IPv4 address provided by the API>
DNS = 1.1.1.1, 1.0.0.1 # put your custom DNS servers here

[Peer]
PublicKey = <exit server public key>
AllowedIPs = 0.0.0.0/0
Endpoint = <exit server IPv4 address>:51820