How to run multiple Tor processes at once with different exit IPs?

Create four torrc files, say /etc/tor/torrc.1 to .4.

In each file, edit the lines:

SocksPort 9050
ControlPort 9051
DataDirectory /var/lib/tor

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

SocksPort 9060
ControlPort 9061
DataDirectory /var/lib/tor1

for torrc.2,

SocksPort 9062
ControlPort 9063
DataDirectory /var/lib/tor2

and so on.

A configuration file containing only the above lines will work: you can delete every other line from the default template if you feel like it.

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

DataDirectory d1

Then start tor like this:

tor -f /etc/tor/torrc.1  
tor -f /etc/tor/torrc.2

and so on for the other two files.

This will create four different Socks5 servers on the four ports. Each one will open a different circuit, which is what you want.

Leave a Comment