Last Updated: September 27, 2021
·
8.706K
· dineshsprabu

Multiple Instance of TOR

Tor is the only the solution available to keep ourselves anonymous on this world of internet .

'''

Whola! If i bring up multiple instances of TOR, Then I can make use of Multiple public IP's, which can be more helpful solving my problem :)

'''

In Ubuntu, Install your Tor command line utility, using the command:

> sudo apt-get install tor

This is simple and enough to bring up a single instance using the command:

> tor

This will create a tor network instance to route all your traffic through a Proxy Chain. Generally, it uses Port 9050, on which you need route all your local network traffic.

Now let us configure multiple instance of TOR now.

For Example: If I need 3 instances, I'll be needed to create 3 files as like below.

File 1:

> touch /etc/tor/torrc.1
> vi /etc/tor/torrc.1
SocksPort 9050
ControlPort 9051
DataDirectory /var/lib/tor

File 2:

> touch /etc/tor/torrc.2
> vi /etc/tor/torrc.2
SocksPort 9060
ControlPort 9061
DataDirectory /var/lib/tor1

File 3:

> touch /etc/tor/torrc.3
> vi /etc/tor/torrc.3
SocksPort 9070
ControlPort 9071
DataDirectory /var/lib/tor3

Now we need to start our TOR instances,

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

(Note: if you face any issue while starting up your tor instance. Please check the ownership of the folder '/var/lib/tor' using 'ls -l /var/lib | grep tor'. Use the command 'chown root /var/lib/tor' to fix it.)

We can test our TOR Proxies with the help of CURL command,

> curl --proxy socks5h://localhost:9050 http://ipinfo.io/ip

176.10.104.240


> curl --proxy socks5h://localhost:9060 http://ipinfo.io/ip

198.96.155.3

> curl --proxy socks5h://localhost:9070 http://ipinfo.io/ip

175.10.104.233

Finally! we've got every Public IP as different, which shows our Multiple Instances of TOR working properly.