How to set up a proxy chain by using Tor

Sudeepa Shiranthaka
3 min readDec 18, 2020

In this article, I am going to configure a proxy chain by using Tor.

But before move on to the article, I want to tell you one thing, this is only for educational purposes, and don’t use this for any unethical purposes.

What is a proxy chain?

Proxy chains give anonymity to anything we perform on the Internet. It may be browsing the web, performing SQL Injection, performing brute force, etc. A proxy chain can contain various types of proxy servers like SOCKS v4, SOCKS v5, HTTPS, etc.

Proxy Vs Proxy chains

Proxy -Usually proxies are found in browsers. This gives anonymity only for HTTP connection or web connection.

Proxy chains-Give more anonymity for all activities.

Steps to configure proxy chain using Tor.

Step 1: Check Tor is running on your machine

dreadace@kali:~$ service tor status

Step 1

Step 2: If it is not working install the Tor using apt

dreadace@kali:~$ sudo apt-get install tor

Step 2

Step 3: Go to /etc/ directory and change the proxychains.conf file as following

sudo nano /etc/proxychains.conf

If you are a root user then you can edit the file without sudo.

Step 3.1 (Before configured)

In default, it looks like the above.

We should uncomment dynamic_chain and comment on the strict_chain.

Step 3.2 (After configured)

Then we should configure the DNS(Domain Name System) as no data leak for that we simply uncomment the proxy DNS requests.

Step 3.3 (Before configuring DNS request)
Step 3.4(After configuring DNS request)

Configuring DNS requests is very important otherwise our IP address changing but our DNS log information is remaining the same.

Finally, we should add the socks5 address to the proxy list.

Step 3.5 (Adding socks5 address)

I have used nano editor for editing. So, save the file using CTRL + o and exit using CTRL + x

Step 4: Check for the tor service is running, if not start the service

dreadace@kali:~$ service tor start

dreadace@kali:~$ service tor status

Step 4(Status checking)

Step 5: Run the proxy chain against the target.

dreadace@kali:~$ proxychains firefox www.duckduckgo.com

Step 5(Running proxy chain)

We can check whether the proxy chain is working or not, by using https://whatismyipaddress.com/ and https://www.dnsleaktest.com/

Step 5 (Result from DNS leak test)

Thank you! and meet you in the next article😊.

--

--

Sudeepa Shiranthaka

Security Engineer | Researcher | Blogger | Writer | AppSec & InfoSec enthusiastic