Port forwarding with Mullvad VPN


Last updated: 6 August 2020

Follow these steps to add and manage your forwarded ports with Mullvad.

What this guide covers:

What is port forwarding?

Port forwarding makes it possible for remote computers to access a specific computer or service within a private local area network (LAN).

For example, Gunilla has a web server on her private LAN that she wants Glenn to visit. She first requests a port to be forwarded to her. Then she configures her web server to listen to that port for any other traffic. Glenn can then connect to the exit IP address of the VPN server that Gunilla is using, as well as the port number, and voila – he has access!

It's like dialing a company's phone number (the IP address) and then punching in the extension number (port) to reach a particular person.

Add ports via Mullvad website

The simplest way to add and manage your ports is via our website. These instructions work for any operating system.

  1. Log in to your Mullvad account page.
  2. Under "Manage your forwarded ports," click on "Add port." The account page will refresh with a new port number.
  3. To remove a port, simply click on the corresponding number.

Use any of your assigned port numbers to allow external hosts to access your local network.

Note: you cannot request a specific port.

Test your port forwarding

Once you've added a port, you can check to make sure that it's working.

Note: don't try to test the port forwarding directly to the Mullvad IP using the same machine, that won't work.

Do you have a service listening on the port?

  • Yes – you can use our port-checking tool to test your port.
  • No – such a service is necessary if you want to test your port. Install the service of your choice or follow our instructions below to install iPerf.

How to install iPerf3

Although the following steps are specific for Windows users, the instructions are similar for other operating systems.

  1. In a browser, navigate to https://iperf.fr and click on "Download iPerf binaries."
  2. Scroll down to your operating system and click on the iPerf link to download the file.
  3. Open the ZIP file and copy the folder within it.
  4. Open your Downloads folder and paste in the folder you just copied.
  5. Right-click on the Windows Start icon and click on "Run" to open the command prompt.
  6. Run cd Downloads.
  7. Run cd iperf-3.1.3-win64.
  8. Run iperf3.exe -s -p 5410 (replace "5410" with the port that you have been assigned).
  9. In the Windows Firewall pop-up window, click on "Allow access". If you have a third-party firewall, please make sure that it is not restrictive.
  10. The iPerf3 service is now installed.
  11. Now you can test your port with our port-checking tool.

Linux-specific instructions for port testing

After adding a port via the Mullvad website, follow these instructions, replacing 5555 with the port that you are assigned:

  1. Install curl if you don't already have it.
  2. In a terminal window, run netcat -l -p 5555.
  3. In another terminal window, run curl https://ipv4.am.i.mullvad.net/port/5555 (if you wish to test ipv6, replace "ipv4" with "ipv6").
  4. If everything is working properly, the result will show "reachable:true".

WireGuard® port forwarding setup

To setup the ports for WireGuard, please log in to your account on our website and then scroll down to Manage your forwarded ports and assign them to your pubkey(s).


Encountering problems? Check the following:

  • Make sure that you disconnect and reconnect the Mullvad client after adding a port.
  • If you are using multiple devices that share the same account and connect to the same server, then only the most recently connected device will have the ports forwarded to it. (This does not apply if you are using WireGuard since you can move the ports around to different pubkeys)
  • Make sure that you don't have a third-party firewall that might be blocking your port.
  • The port forwarded service cannot be accessed with a computer/device that is using Mullvad with the same VPN server.


Q: Does port forwarding work with both TCP and UDP?
A: Yes

Q: Does port forwarding work with both IPv4 and IPv6?
A: Yes


"WireGuard" is a registered trademark of Jason A. Donenfeld.