Checking connection...

Plex with Mullvad


Last updated: 29 July 2020

In this guide, we walk you through the steps so you can get Plex working with Mullvad.

First add a Port to be forwarded to your Mullvad account

  1. Log in to your Mullvad account on our website and then click on ADD PORT to add a port that you can use for Plex.
  2. Reconnect to a VPN server.
  3. In the Mullvad VPN app click on the Settings icon,  preferences and then enable Local network sharing

Change Plex to listen on the added port

  1. Open Plex
  2. Click on Settings
  3. Click on Remote Access
  4. Enable remote access
  5. Check the "Manually specify public port" checkbox and enter the port number you were previously assigned and click on APPLY.


Add a firewall rule

  1. Click on the Windows key (Start)
  2. Type wf.msc and hit enter
  3. Click on Inbound Rules to select it
  4. Click on New Rule...
  5. Select Port and then Next
  6. Select TCP and  Specific local ports and enter the port number you were assigned previously and then click Next
  7. Select Allow the connection and then Next
  8. Select both Private and public networks and click Next
  9. Enter a name, for instance "Plex port XXXXX" and then click on Finish

Add a forwarding rule

  1. Open a command prompt and run it as Administrator (Windows key type CMD and then click on "Run as Administrator")
  2. Write the following (on a single line) and then press enter (replace xxxxx with the port you were assigned) :
    netsh interface portproxy add v4tov4 listenport=xxxxx listenaddress= connectport=32400 connectaddress=

Start the forwarding rule

These steps will start the forwarding rule when you log in to Windows.

  1. Open notepad and paste the netsh command into it.
  2. Save the file as plex.bat
  3. Click on the Windows key and type taskschd.msc and then hit enter
  4. Click on Create basic task,
  5. Name it Plex and click on Next
  6. Select When I log on then Next.
  7. Select Start a program and click on Next.
  8. In the Program/script field click on browse and add the plex.bat that you previous created and click on Next
  9. Click on Finish
  10. Click on Task Scheduler library
  11. Double click on Plex
  12. Select Run with highest privileges found under General
  13. Save the changes by clicking on OK


  1. Enable forwarding by opening a terminal and running sudo sysctl -w net.inet.ip.forwarding=1.
  2. To add a forwarding rule, run echo "rdr pass inet proto tcp from any to any port xxxxx -> port 32400" | sudo pfctl -ef - (replace xxxxx with the port you were assigned).
  3. To add a persistent redirect rule, run
    sudo su
    echo "rdr pass inet proto tcp from any to any port xxxxx -> port 32400" > /etc/pf.anchors/plex

    (replace xxxxx with the port you were assigned).
    Add the following to /private/etc/sysctl.conf net.inet.ip.forwarding=1
  4. To create a com.plex.pfctl.plist file, run sudo nano /Library/LaunchDaemons/com.plex.pfctl.plist
  5. Paste the following into the file
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "">
    <plist version="1.0">
  6. Then press ctrl + x and then Y and Enter to save.
  7. Add the following to /etc/pf.conf
    rdr-anchor "port32400"
    load anchor "port32400" from "/etc/pf.anchors/plex"


Add a redirect rule by running the following code (replace xxxxx with the port you were assigned): sudo iptables -t nat -I PREROUTING -p tcp --dport xxxxx -j REDIRECT --to 32400


Plex shows that it's accessible for less than a second (Windows)

Try to disable the firewall temporarily. In Windows: In the firewall settings right click on "Windows Defender Firewall" and select Properties, then set "Firewall state" to off on the three tabs Domain Profile, Private Profile and Public Profile. If that helps then turn it back on again and check that you added the rule correctly in the step above.

I am not sure if the netsh command worked (Windows)

Run the command netsh interface portproxy show all to see the added rule. To remove the rule(s) run netsh interface portproxy reset.

How to check that the port forwarding works? (Windows)

Read our port forwarding guide.

1. Run the command netsh interface portproxy reset in an elevated command prompt.

2. Start iperf with the command iperf3 -s -p xxxxx.

3. Go to our port check tool and check that the port is open.

Note: You can not connect to the SOCKS5 proxy's exit IP since SOCKS5 does not support port forwarding. Make sure that the proxy is disabled in the webbrowser.

Does it work with both OpenVPN and WireGuard?

Yes. If you use WireGuard then you have to add the port next to the WireGuard key that the app is using.

The Plex settings does not show the server settings and Remote Access (macOS)

Make sure that you have enabled Local network sharing in the Mullvad app. Try to quit Plex from the Plex icon in the macOS menu bar and start it again. Then click on the Plex icon and select "Preferences...".