Run multiple tor instances


Suppose we want to create three tor instances, with each having its specific ip. 

Create three torrc files, say /etc/tor/torrc.1 to .3.

In each file, edit the lines:

to use different resources for each torrc file, e.g. for for torrc.1:

for torrc.2,

and so on.

DataDirectory can also be relative to the current directory where tor is launched, e.g.:

Then start tor like this:

This will create three different Socks5 servers on the three ports. Each one will open a different circuit.

We can export the variable TORSOCKS_CONF_FILE to point to the corresponding torn file:
E.g. $> export TORSOCKS_CONF_FILE="/etc/tor/torrc.1"

Next you can torify / torsocks any application from that particular shell by using the torrc.1 proxy.
Try: $> torify bash
$> curl