Tor and Mullvad VPN
Connectivity Windows Linux OpenVPN macOS Desktop Tor
Sist oppdatert:
In this guide we will install Tor / Tor Browser and enable other apps to connect to the internet via the Tor proxy and Mullvad VPN.
What this guide covers
Overview
First we will install OpenVPN and configure it to connect to Mullvad via the Tor Browser (Windows, macOS) or Tor service (Linux). Then we will configure Firefox (or other apps) to connect to Mullvad using our SOCKS5 proxy.
The end result is that Firefox connects via Tor to Mullvad ("VPN through Tor"). Mullvad will be the exit node.
The Tor Browser itself will only use the Tor Network.
Apps that you have not configured with our SOCKS5 proxy will connect directly to the internet without using any VPN or Tor at all.
Set-up instructions
Windows
- Install OpenVPN (OpenVPN installation guide)
- Download the Tor Browser for Windows
- Verify the signature
- Install the Tor Browser
- Open the Tor Browser folder on the desktop
- Navigate to Browser -> TorBrowser -> Data -> Tor
- Open torrc-defaults with Notepad and change CookieAuthentication 1 to CookieAuthentication 0
This disables the Tor ControlPort cookie file. Note that the torrc-defaults file may be overwritten during the next Tor Browser update. - Save the file
- Download an OpenVPN configuration file from our website, making sure you select Windows as Platform and under Advanced settings select Port: T***** 443 (Tor only works with T*****, not UDP).
- Extract the zip file to your desktop
- Open the OpenVPN configuration file with Notepad
- Add the following entries to it:
route-nopull
route 10.8.0.1 255.255.255.255
socks-proxy 127.0.0.1 9150
- Save the changes and then copy the files into C:\program files\openvpn\config\
- Start the Tor Browser
- Right-click on the OpenVPN GUI icon and select Run as administrator
- Click Yes for the Pop-up requesting permission for making changes
- Right-click on the OpenVPN icon in the systray and select the Mullvad profile and then click on connect
- Start Firefox. Go to the Settings and search for "socks", then click on "Settings..." and "Manual proxy configuration". Enter SOCKS Host 10.8.0.1 and Port 1080 and enable Proxy DNS when using SOCKS v5.
- Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.
macOS
- Download and install TunnelBlick
- Log in on our website and go to the OpenVPN configuration file generator
- Select macOS as platform
- Select Advanced Settings > Port > T***** 443 (Tor only works with T*****, not UDP).
- Select a country and click on Download zip archive and then save it to your computer
- Right-click the downloaded and extracted Mullvad.tblk file and select "Show Package Contents"
- Open the OpenVPN configuration file (mullvad_xx.conf) with TextEdit
- Add the following entries to it anywhere in the file:
route-nopull
route 10.8.0.1 255.255.255.255
socks-proxy 127.0.0.1 9150
- If there is a line that says "tun-ipv6" then remove it
- Close TextEdit (the file will save automatically)
- Double-click on Mullvad.tblk and add the configuration to Tunnelblick
- Download Tor Browser, verify the signature and then install it
- Use Finder and go to the Applications folder
- Start Tor Browser one time to verify the integrity and then quit it
- Right-click the "Tor Browser" application and click "Show Package Contents"
- Go to the subdirectory Content > Resources > TorBrowser > Tor
- Open torrc-defaults in TextEdit and change CookieAuthentication 1 to CookieAuthentication 0
This disables the Tor ControlPort cookie file. Note that the torrc-defaults file may be overwritten during the next Tor Browser update. - Close TextEdit (the file will save automatically)
- Start the Tor Browser
- Select Connect Mullvad from the Tunnelblick icon in the macOS menubar (it will warn that the IP did not change, this is normal)
- Start Firefox. Go to the Settings and search for "socks", then click on "Settings..." and "Manual proxy configuration". Enter SOCKS Host 10.8.0.1 and Port 1080 and enable Proxy DNS when using SOCKS v5.
- Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.
Linux
- Install Tor using the Terminal:
- Fedora:
sudo dnf install tor
Debian/Ubuntu:sudo apt install tor
- Enable and start the tor service daemon:
sudo systemctl enable --now tor
- Install OpenVPN:
sudo dnf install openvpn
- Download an OpenVPN configuration file from our website, make sure you select Linux as Platform and T***** 443 as the Port (Tor only works with T*****, not UDP).
- Unzip the file and edit the OpenVPN configuration file (mullvad_xx_xxx.conf):
Add the following entries to it:
route-nopull
route 10.8.0.1 255.255.255.255
socks-proxy 127.0.0.1 9050
Fedora: remove theup
anddown
lines - Move the configuration files to /etc/openvpn:
sudo mv mullvad* /etc/openvpn
- Connect with OpenVPN:
cd /etc/openvpn
sudo openvpn --config mullvad_xx_xxx.conf
You should see "Initialization Sequence Completed" on one of the last lines. - Test your connection through our SOCKS5 proxy in a new Terminal tab or window:
curl --socks5 10.8.0.1 https://am.i.mullvad.net/connected
It should say "You are connected to Mullvad". - Start Firefox. Go to the Settings and search for "socks", then click on "Settings..." and then "Manual proxy configuration". Enter SOCKS Host 10.8.0.1 and Port 1080 and enable Proxy DNS when using SOCKS v5.
Note: If you are disconnected from OpenVPN then the SOCKS proxy will act as a kill switch and block the traffic in Firefox. - Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.