Przejdź do głównej zawartości

Tor and Mullvad VPN

Connectivity Windows Linux OpenVPN macOS Desktop Tor 

Data ostatniej aktualizacji:

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

  1. Install OpenVPN (OpenVPN installation guide)
  2. Download the Tor Browser for Windows
  3. Verify the signature
  4. Install the Tor Browser
  5. Open the Tor Browser folder on the desktop
  6. Navigate to Browser -> TorBrowser -> Data -> Tor
  7. 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.
  8. Save the file
  9. 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).
  10. Extract the zip file to your desktop
  11. Open the OpenVPN configuration file with Notepad
  12. Add the following entries to it:
    route-nopull
    route 10.8.0.1 255.255.255.255
    socks-proxy 127.0.0.1 9150
  13. Save the changes and then copy the files into C:\program files\openvpn\config\
  14. Start the Tor Browser
  15. Right-click on the OpenVPN GUI icon and select Run as administrator
  16. Click Yes for the Pop-up requesting permission for making changes
  17. Right-click on the OpenVPN icon in the systray and select the Mullvad profile and then click on connect
  18. 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.
  19. Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.

macOS

  1. Download and install TunnelBlick
  2. Log in on our website and go to the OpenVPN configuration file generator
  3. Select macOS as platform
  4. Select Advanced Settings >  Port > T***** 443 (Tor only works with T*****, not UDP).
  5. Select a country and click on Download zip archive and then save it to your computer
  6. Right-click the downloaded and extracted Mullvad.tblk file and select "Show Package Contents"
  7. Open the OpenVPN configuration file (mullvad_xx.conf) with TextEdit
  8. 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
  9. If there is a line that says "tun-ipv6" then remove it
  10. Close TextEdit (the file will save automatically)
  11. Double-click on Mullvad.tblk and add the configuration to Tunnelblick
  12. Download Tor Browser, verify the signature and then install it
  13. Use Finder and go to the Applications folder
  14. Start Tor Browser one time to verify the integrity and then quit it
  15. Right-click the "Tor Browser" application and click "Show Package Contents"
  16. Go to the subdirectory Content > Resources > TorBrowser > Tor
  17. 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.
  18. Close TextEdit (the file will save automatically)
  19. Start the Tor Browser
  20. Select Connect Mullvad from the Tunnelblick icon in the macOS menubar (it will warn that the IP did not change, this is normal)
  21. 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.
  22. Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.

Linux

  1. Install Tor using the Terminal:
  2. Fedora: sudo dnf install tor
    Debian/Ubuntu: sudo apt install tor
  3. Enable and start the tor service daemon:
    sudo systemctl enable --now tor
  4. Install OpenVPN:
    sudo dnf install openvpn
  5. 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).
  6. 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 the up and down lines
  7. Move the configuration files to /etc/openvpn:
    sudo mv mullvad* /etc/openvpn
  8. 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.
  9. 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".
  10. 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.
  11. Go to our Connection check and make sure that it says "Using Mullvad VPN". All the three boxes should be green.