21

I would like to run multiple Tor Browsers all at once, with each having a unique Tor IP address.

I would like to do this with the latest Tor Browser. Please post simple instructions, as I'm new to this and would appreciate help.

I'm running Tor Browser on Windows.

5
  • If you mean different Tor exit addresses, I think the easiest (and only?) option is to run different Tor instances on different ports, and to have for each Tor instance a different browser (or a different browser profile, for example with Firefox) configured to use that instance.
    – Pierre
    Commented Apr 24, 2014 at 17:39
  • If someone could explain how to get the other Tor browsers working with the first one's ControlPort, that would be very cool.
    – mirimir
    Commented Jul 22, 2014 at 20:17
  • You can achieve this by running multiple Whonix instances: gateway and workstation VMs.
    – user3273
    Commented Jul 27, 2014 at 11:46
  • Non-browser version: superuser.com/questions/188994/… Commented Nov 17, 2015 at 21:30
  • This is working now (2022): stackoverflow.com/a/67202369/1136132
    – joseantgv
    Commented Mar 7, 2022 at 11:39

4 Answers 4

16

This method launches multiple Tor instances, each with its own SocksPort and ControlPort. This ensures that the Tor Browsers are fully functional, portable, and self-contained. However, someone should confirm that I haven't missed anything that could compromise TBs security.

  1. Optional: Download, verify, and install Tor Browser.
  2. Make copies of the Tor Browser folder with different names (eg. Number them)
  3. Launch Tor Browser
  4. Edit about:config
    • Modify extensions.torlauncher.control_port to a new ControlPort (eg. 9052 for Tor Browser 2)
  5. Edit TorButton Preferences (without the GUI [removed in 4.5 update])
    • Modify extensions.torbutton.custom.socks_port (on newer versions this is network.proxy.socks_port) to a new port (eg. 9152 for Tor Browser 2)
    • Modify extensions.torbutton.custom.socks_host (on newer versions this is network.proxy.socks) to 127.0.0.1
    • Modify extensions.torbutton.proxies_applied to false (doesn't exist on newer versions)
    • Modify extensions.torbutton.use_privoxy to false (doesn't exist on newer versions)
  6. Close Tor Browser
  7. Edit torrc-defaults in Browser\TorBrowser\Data\Tor
    • Change SocksPort to what you set in step 5
    • Change ControlPort to what you set in step 4
  8. Launch Tor Browser, and check that everything was configured correctly
    • Homepage (about:tor) should say "Congratulations!"
    • Click "Test Tor Network Settings". check.torproject.org should say "Congratulations."
    • Go to ip-check.info. Test should be all green and orange except Tab name. Authentication should be "protected". Note: It may not say that you are using Tor, but this is incorrect.
    • Optional: Go to ipleak.net for IP, DNS, Geolocation, Browser and other info
    • Optional: Test your browser fingerprint at panopticlick.eff.org
  9. Optional: Edit about:config
    • Type “banned" and modify the ports of the two entries. Add all the new SocksPort and ControlPort to the list (Copy the ports from other Tor Browsers)
  10. Optional: Turn on “Forbid Scripts Globally” in NoScript for further security and privacy (also reduces browser fingerprint)
  11. Repeat 3-10 for each Tor Browser folder

Alternatively, this might be possible with a single Tor instance as the SocksPort and ControlPort. This would require the use of the control_auth_cookie (CookieAuthentication) or HashedControlPassword, and about:config extensions.torlauncher.start_tor=false. However, the browsers would not be self-contained and portable, as they would require a process that isn’t in their own directory.

Inspired by mirimir's answer which seemed to compromise TB's security.

5
  • Please Help on Step 7 Step 7- Edit torrc-defaults in \TorBrowser\Data\Tor Change SocksPort to what you set in step 5 Change ControlPort to what you set in step 4 When i open this folder , i can't see "Socksport" and "ControlPort" all i see is file with Type:File ,no one can edit them!
    – user7598
    Commented Jun 7, 2015 at 9:50
  • This answer seems outdated (step 5 particularly), since there's no GUI in Tor Button anymore. Is there an updated way to achieve this ? Furthermore, how does this answer may compromise TB's security ?
    – X.LINK
    Commented Apr 25, 2018 at 10:27
  • doesnt work on Tor Browser 8.0
    – juanora
    Commented Sep 6, 2018 at 12:05
  • For TBB 8, skip step 7 (editing torrc-default). Otherwise the control and socks port are configured twice, causing tor to attempt to bind to the control port and socks port twice and fail.
    – Kevinoid
    Commented Dec 30, 2018 at 2:25
  • with tor-browser version 13.0.13 i only have to set extensions.torlauncher.tordatadir_path = "$HOME/.tor project/Tor.$N" to fix the Tor Browser could not connect to Tor error. instead of SocksPort and ControlPort, it uses control.socket and socks.socket in extensions.torlauncher.tmp_ipc_dir = "/run/user/$UID/Tor-$N". see also use different tordatadir_path for different firefox profiles
    – milahu
    Commented Oct 5 at 19:49
7

Install the first Tor browser as directed. Then change the folder name, perhaps adding "a" or "1" to the end. Now install the second Tor browser, and change its folder name, continuing whatever pattern you've chosen.

Open the second Tor browser, and browse about:config. Search for "torlauncher", and double-click the extensions.torlauncher.start_tor (whichs value is set to true) to toggle it to false. See Tor ticket 6009. I got that reference from the Whonix documentation, by the way.

Now edit ..Browser\TorBrowser\Data\Tor\torrc-defaults in the first Tor browser folder, and add additional SocksPort lines: for example, SocksPort 9152, SocksPort 9153 etc. Save changes and exit the editor. Then start the first Tor browser. Its Tor instance will now handle your other Tor browsers.

Now open the second Tor browser then TorButton Preferences. Select "Use custom settings" then change the SOCKS Port to 9152 and click OK. Browse https://check.torproject.org/ and verify that you're using Tor.

Now close both the first and second Tor browsers. Install the third Tor browser, and change its folder name, continuing whatever pattern you've chosen.

Start the third Tor browser, and browse about:config. Search for "torlauncher", and double-click the extensions.torlauncher.start_tor line to set it to false. Then change its SOCKS Port to 9153, and close it.

Now start the first Tor browser, and then the third Tor browser. In the third Tor browser, browse https://check.torproject.org/ and verify that you're using Tor.

Repeat the previous four paragraphs as desired.

2
  • I tried whatever you said in your answer, but unfortunately,mirimir, it didn't work.
    – user6682
    Commented Feb 8, 2015 at 11:32
  • Just change the SOCKS port. Do not set extensions.torlauncher.start_tor=false. That's only if you use a system Tor, which requires setting a control port password too. Commented May 11, 2015 at 20:36
3

Inspired in TorUser's answer, here is a bash script to automate that.

#!/bin/bash

usage() { echo "Usage: $0 [-n <number of copies>] [-p <path to default TBB>]" 1>&2; exit 1; }

print_userjs(){
  local socksport=${1}
  local controlport=${2}
  local dest=${3}
  echo "user_pref(\"extensions.torlauncher.control_port\",$controlport);" > $dest
  echo "user_pref(\"extensions.torbutton.custom.socks_port\",$socksport);" >> $dest
  echo "user_pref(\"extensions.torbutton.custom.socks_host\",\"127.0.0.1\");" >> $dest
  echo "user_pref(\"extensions.torbutton.proxies_applied\",false);" >> $dest
  echo "user_pref(\"extensions.torbutton.use_privoxy\",false);" >> $dest
  echo "user_pref(\"network.proxy.socks_port\",$socksport);" >> $dest
}

while getopts ":n:p:" o; do
  case "${o}" in
    n)
      n=${OPTARG}
      ;;
    p)
      p=${OPTARG}
      ;;
    *)
      usage
      exit 0
     ;;
  esac
done
if [ -z "$n" ] || [ -z "$p" ];
then
  usage
  exit 0
fi
for i in `seq 1 $n`;
do
  CONTROL_PORT=$((9151+$i*2))
  SOCKS_PORT=$((9150+$i*2)) 
  echo "$i) Copying $p to TBB$i"
  cp -r $p TBB$i
  echo "$i) Creating user.js with SocksPort $SOCKS_PORT and ControlPort $CONTROL_PORT"
  print_userjs $SOCKS_PORT $CONTROL_PORT "./TBB$i/Browser/TorBrowser/Data/Browser/profile.default/user.js"
  echo "$i) Modifying torrc-default"

  # update: These are not needed with newer versions of Tor Browser
  # TORRC="./TBB$i/Browser/TorBrowser/Data/Tor/torrc-defaults"
  # sed -i "s/SocksPort 9150/SocksPort $SOCKS_PORT/g" $TORRC 
  # sed -i "s/ControlPort 9151/ControlPort $CONTROL_PORT/g" $TORRC

done

(Update: in the recent Tor Browser (December 2019) it is not longer required (neither will work) to modify torrc-defaults. The browser extensions seem to start Tor already with those port settings from user.js. So it is enough to just modify user.js in the browser profile.)

0

Tor uses default proxy port 8118. Now, you want multiple browsers using the same Tor instance. You have to download Privoxy click here this is use to enable the Proxy port.
To chain Privoxy and Tor, both running on the same system, change the browser Proxy setting like this:

ip address : 127.0.0.1 
port : 8118 


Now see if proxy port is running check here If it is running, you can now make a Tor request using multiple browsers

If you have any issue, let me know..
Thank's

2
  • 1
    Tor Browser doesn't use privoxy anymore, and so "Tor uses default proxy port 8118" is no longer accurate. (I wonder if we should just remove this answer so it is no longer a useful one?) Commented Mar 9, 2016 at 1:02
  • @RogerDingledine IMHO deleting the answer is appropriate, at least according to meta.stackexchange.com/revisions/11706/2. («If the answer is outdated or no longer relevant either delete it or update it so it is relevant.»)
    – myrdd
    Commented Apr 8, 2018 at 10:48

You must log in to answer this question.