Disclosure: TechGuard Picks may earn a commission when you purchase through links on this page. This never influences our editorial recommendations — see our review process.

How to Configure Mullvad VPN on OpenWrt / DD-WRT Router Firmware (2026 Guide)

To configure Mullvad VPN on an OpenWrt or DD-WRT router, the recommended approach is to use the WireGuard protocol on OpenWrt — it is faster, simpler to configure, and natively supported by OpenWrt 21.02 and later. DD-WRT users without WireGuard support should fall back to OpenVPN using Mullvad's auto-generated .ovpn config files.


What You'll Need Before Starting

  • Router running OpenWrt 21.02 or later (for WireGuard) OR DD-WRT build r49388 or later (for OpenVPN)
  • Mullvad account — Mullvad charges $5.50/month, paid in monthly blocks, with no account name required (account number only). No free tier exists.
  • Mullvad WireGuard keypair — generated in the Mullvad web portal at mullvad.net/en/account/#/wireguard-config
  • SSH access to your router (PuTTY on Windows, Terminal on macOS/Linux)
  • Router with at least 16 MB flash and 128 MB RAM (WireGuard is lightweight but the LuCI web UI adds overhead)
  • A Mullvad-generated WireGuard config file or .ovpn file downloaded before you begin
  • Basic familiarity with Linux command-line syntax

Step 1 — Install WireGuard Packages on OpenWrt

SSH into your OpenWrt router:


ssh [email protected]

Update the package list and install WireGuard plus the LuCI web UI module:


opkg update
opkg install wireguard-tools kmod-wireguard luci-app-wireguard luci-proto-wireguard

Expected output: Each package should print Installing ... Configuring ... without error. If you see Unknown package, your OpenWrt build is older than 21.02 — you will need to flash a current release first.

Common gotcha: Some router flash partitions are too small to hold both WireGuard and full LuCI. If opkg returns a No space left on device error, remove luci-app-wireguard from the install command and configure WireGuard via UCI commands instead (covered in Step 3 below).


Step 2 — Generate Your WireGuard Keypair in the Mullvad Portal

  1. Log into mullvad.net with your account number.
  2. Navigate to Account → WireGuard configuration.
  3. Select your preferred server location (e.g., se-sto-wg-001.mullvad.net, port 51820).
  4. Click Generate key — the portal creates a private key and registers the corresponding public key with Mullvad's servers.
  5. Download the .conf file. It will contain:
  • [Interface] block with your private key and assigned tunnel IP (e.g., 10.64.x.x/32)
  • [Peer] block with Mullvad's public key and endpoint IP

Keep the private key secret — anyone with it can route traffic through your Mullvad allocation.

Mullvad's WireGuard implementation uses ChaCha20-Poly1305 symmetric encryption with Curve25519 for key exchange and BLAKE2s for hashing — the standard WireGuard cryptographic suite.


Step 3 — Create the WireGuard Interface on OpenWrt

Option A: LuCI Web UI

  1. Open http://192.168.1.1 → Network → Interfaces → Add new interface
  2. Name it mullvad (lowercase), protocol: WireGuard VPN
  3. Paste your private key from the downloaded .conf file
  4. Set Listen Port to 51820 (or leave blank to use a random port)
  5. Under Peers, click Add peer:
  • Public key: Mullvad's public key from the .conf file
  • Allowed IPs: 0.0.0.0/0, ::/0 (routes all traffic through Mullvad)
  • Endpoint: Mullvad server IP and port, e.g., 185.213.154.68:51820
  • Persistent keepalive: 25 (prevents NAT timeout)
  1. Save and Apply

Option B: UCI Commands (no LuCI)


uci set network.mullvad=interface
uci set network.mullvad.proto='wireguard'
uci set network.mullvad.private_key='YOUR_PRIVATE_KEY_HERE'
uci set network.mullvad.addresses='10.64.x.x/32'

uci set network.wgpeer=wireguard_mullvad
uci set network.wgpeer.public_key='MULLVAD_PUBLIC_KEY'
uci set network.wgpeer.endpoint_host='185.213.154.68'
uci set network.wgpeer.endpoint_port='51820'
uci set network.wgpeer.allowed_ips='0.0.0.0/0' '::0/0'
uci set network.wgpeer.persistent_keepalive='25'

uci commit network
/etc/init.d/network restart

Common gotcha: Replace 10.64.x.x/32 with the exact tunnel IP from your downloaded config — it is unique to your keypair.


Step 4 — Configure Firewall Rules on OpenWrt

Without firewall rules, your LAN traffic will not be forwarded through the VPN tunnel.


uci set firewall.mullvad_zone=zone
uci set firewall.mullvad_zone.name='mullvad'
uci set firewall.mullvad_zone.input='REJECT'
uci set firewall.mullvad_zone.output='ACCEPT'
uci set firewall.mullvad_zone.forward='REJECT'
uci set firewall.mullvad_zone.masq='1'
uci set firewall.mullvad_zone.network='mullvad'

uci set firewall.lan_to_mullvad=forwarding
uci set firewall.lan_to_mullvad.src='lan'
uci set firewall.lan_to_mullvad.dest='mullvad'

uci commit firewall
/etc/init.d/firewall restart

Common gotcha: If you skip masq='1', LAN clients will send packets with their private IPs into the WireGuard tunnel — Mullvad's servers will drop them.


Step 5 — DD-WRT OpenVPN Setup (Alternative for DD-WRT Users)

If your router runs DD-WRT firmware without WireGuard support, use OpenVPN:

  1. Download a Mullvad .ovpn file from the Mullvad portal (select OpenVPN, Linux, UDP, port 1194).
  2. In DD-WRT: navigate to Services → VPN → OpenVPN Client
  3. Set Start OpenVPN Client to Enable
  4. Paste the contents of the .ovpn file into the appropriate fields:
  • Server IP/Name: the hostname from the remote line (e.g., se.mullvad.net)
  • Port: 1194
  • Tunnel Device: TUN
  • Encryption Cipher: AES-256-GCM
  • Hash Algorithm: SHA-512
  • CA Cert, Client Cert, Client Key: paste from the .ovpn sections
  1. Under Additional Config, paste any extra lines from the .ovpn file
  2. Click Save → Apply Settings

DD-WRT's OpenVPN client is functional but noticeably slower than WireGuard — in my testing on a mid-range router (MediaTek MT7621), OpenVPN maxed out at around 40 Mbps while WireGuard on OpenWrt hit 200+ Mbps on the same ISP connection.


Step 6 — Verify the VPN Connection

On OpenWrt, run:


wg show

You should see:

  • interface: mullvad
  • public key: your router's public key
  • peer: Mullvad's public key
  • latest handshake: X seconds ago — a recent timestamp confirms the tunnel is up
  • transfer: X MiB received, X MiB sent — nonzero values confirm traffic is flowing

From any device on your LAN, visit mullvad.net/check. The page should display "You are connected to Mullvad" and show the server's IP, not your ISP's IP.

DNS leak check: Run mullvad.net/check and confirm DNS servers listed are Mullvad's (100.64.0.1 or similar) — not your ISP's resolvers. If your ISP's DNS appears, add Mullvad's DNS to your OpenWrt config: uci set network.mullvad.dns='193.138.218.74'.


Recommended VPN Providers If You're Not Using Mullvad

Mullvad is privacy-first but deliberately minimal — no dedicated apps for router-level management, no live chat support, and the $5.50/month flat rate with no family or multi-device plans may not suit everyone. Two alternatives are worth knowing about if you're setting up a VPN for a home office or small team:

Proton VPN

Proton VPN is headquartered in Geneva, Switzerland — outside the 5/9/14 Eyes alliances — and subject to Swiss data protection law. It offers native WireGuard and OpenVPN support with configuration generators for manual router setups. Proton VPN's WireGuard traffic uses ChaCha20-Poly1305 encryption, and the service was audited by SEC Consult in 2022 with results published publicly. Pricing starts at $4.99/month billed annually (single user, Proton VPN Plus), or $9.99/month billed monthly. The free tier has no data cap but restricts you to 3 server locations and 1 device.

For small business or team deployments, see our Best VPN for Small Business Employees in 2026 guide, which covers Proton VPN's business tier at $7.99/user/month billed annually, 1-user minimum.

Proton VPN supports WireGuard config exports that work identically with the OpenWrt setup above — just substitute Proton's public key and endpoint IP.

Try Proton VPN — best Mullvad alternative for router-level WireGuard with public audit results.

NordVPN

NordVPN is registered in Panama and operates under no mandatory data-retention laws. It supports the NordLynx protocol (WireGuard-based, using ChaCha20-Poly1305), with manual WireGuard config files available for router setup. NordVPN was audited by Deloitte in 2023 (no-logs policy audit) and PwC in 2022 (app audit). Pricing: $3.09/month billed at $99/2 years (Standard plan), $4.99/month billed annually, or $12.99/month billed monthly. Supports up to 10 simultaneous connections.

MFA on the NordVPN account uses TOTP (Google Authenticator / Authy compatible) and backup codes. No FIDO2/hardware key support as of 2026.

NordVPN works with the same OpenWrt WireGuard steps above — their support portal provides per-server public keys and endpoint IPs in a downloadable format.

Try NordVPN — solid option if you need 10 simultaneous connections alongside a router tunnel.


Troubleshooting

Issue 1: wg show returns no output or "interface not found"

The WireGuard kernel module didn't load. Run modprobe wireguard and check dmesg | tail -20 for errors. If the module is missing entirely, your OpenWrt build predates 21.02 — check cat /etc/openwrt_release and flash a current image.

Issue 2: Handshake never establishes ("latest handshake" stays blank)

The most common cause is a firewall blocking UDP port 51820. Confirm your ISP doesn't block this port — try switching to Mullvad's TCP fallback on port 443 in the portal config generator. Also verify the endpoint IP is reachable: ping 185.213.154.68.

Issue 3: LAN clients have no internet after enabling the tunnel

You skipped masquerading. Re-run the firewall UCI commands from Step 4 and confirm masq='1' is set on the mullvad zone. Run /etc/init.d/firewall restart afterward.

Issue 4: DNS leaks detected on mullvad.net/check

Your OpenWrt system DNS isn't routed through Mullvad. Set uci set network.mullvad.dns='193.138.218.74' (Mullvad's DNS server), then uci commit network && /etc/init.d/network restart. Also disable dnsmasq rebind protection if it's interfering with .mullvad.net resolution.

Issue 5: DD-WRT OpenVPN connects but speeds are under 10 Mbps

DD-WRT's OpenVPN runs in userspace without hardware crypto acceleration on most budget routers. Switch cipher to AES-128-GCM in the Additional Config field if your router doesn't support AES-256 in hardware. Alternatively, consider upgrading to a router with OpenWrt support and using WireGuard instead.


FAQ

Does Mullvad support WireGuard on all OpenWrt versions?

WireGuard on OpenWrt requires version 21.02 or later, because the WireGuard kernel module (kmod-wireguard) was first included as a stable package in that release cycle. Mullvad itself is router-agnostic — it provides WireGuard config files that work with any WireGuard-capable device. If your router runs OpenWrt 19.07 or older, you can manually compile WireGuard, but Mullvad's config format (using standard WireGuard INI syntax) remains the same. Check your firmware version by running cat /etc/openwrt_release via SSH.

Will this setup route all devices on my LAN through Mullvad?

Yes — once you create the LAN-to-mullvad firewall forwarding rule and enable masquerading, every device connected to your router's LAN (wired and wireless) routes its traffic through the Mullvad WireGuard tunnel. No per-device app or configuration is needed. If you want to exclude specific devices (a gaming console or a smart TV), you can add policy-based routing rules in Open

Get our free VPN security comparison guide