You are currently viewing How to Setup PROXYCHAINS in Kali-Linux

How to Setup PROXYCHAINS in Kali-Linux

proxychains is open source software for Linux systems and comes pre-installed with Kali Linux, the tool redirects TCP connections through proxies like TOR, SOCKS4, SOCKS5, and HTTP (S) and it allows us to chain proxy servers. With proxychains, we can hide the IP address of the source traffic and evade IDS and firewalls.

To setup proxychains you will first need the tor service, most of the time the service is preinstalled. To check if there is tor service available or not just use this command.

First Switch to ROOT user

sudo -i

Type your password and enter, Now you’re in Root user. so type,

root@kali:~# service tor satus

If you get this output that means TOR is not installed in your system and not running,

Means TOR is installed in your system and running.

For installing TOR,

root@kali:~# apt-get install tor

We had already installed tor service before so there will be a difference in execution. If you get any error while doing this then do update && upgrade and reboot, and do again.

If TOR Successfully installs then, Start TOR service.

root@kali:~# service tor start

Now to check the TOR service status.

root@kali:~# service tor status

ctrl +c for cancel.

NOTE: If you want to stop TOR service, type service tor stop

Configure proxychains

After installing tor service now we need to configure proxychains. To do so use the following command.

Note: you must in ROOT user. if you do not then switch to Root.

root@kali:~# nano /etc/proxychains.conf

You see this type of file in the terminal. you will see “#” which means bash language commentsif there is no “#” hash that means it defaults running. or if we remove “#” hash that means we want to run this. You can use arrow keys to scroll down & up and read file content and do the following changes as you need.

Configuring ProxyChains

Proxychains is fully customizable you can configure with the Tor network as well as proxies like HTTP(S), HTTP, and SOCKS. In proxychains we can choose three different

ProxyChains use three chaining options:

  1. Strict Chain
  2. Dynamic Chain
  3. Random Chain
techdhee@kali:~|⇒ sudo nano /etc/proxychains.conf
ProxyChains use three chaining options

Strict Chain

Strict Chain is the default option in proxychains. In this option, every connection goes through the proxies in order that are listed in the configuration file. Strict Chain is very useful when you want your location and you know that your selected proxies working fine. For using a strict chain you have to uncomment “strict_chain” in the configuration file.

Dynamic Chain

Dynamic Chain working the same as a strict chain, it is used all the proxies which are in the configuration file, but it is skipped or excludes those proxies from the chain which is dead or not working at the time. For using a dynamic chain you have to uncomment “dynamic chain”  and comment both “random_chain” and “strict_chain” in the configuration file.

Random Chain

Random Chain means randomness which means every connection goes through a proxy which is listed in your configuration file but randomly, no one guesses which proxies are next. For using a dynamic chain you have to uncomment “random_chain”  and comment both “dynamic chain” and “strict_chain” in the configuration file.

If you are using random_chain you have to uncomment the “chain_len” line which enables the dynamic chaining.  It connects a number of IP addresses in the chain which is randomly generated from your proxies list.

As you see in this there are three types of proxychains: 1)dynamic 2)strict 3)random

we’re going to use dynamic chain,

  1. Remove Dynamic chain from comment
  2. comment Strict chain and Random chain
  1. Remove proxy DNS from comment
  2. Also, Remove Proxy DNS requests — no leak for DNS data from comment

Tips: here removing proxy DNS and no leak for DNS data, helps you to fully anonymous.

3. Now, write socks5 9050 in the last line of the proxy list.

Now just write save by ctrl+o and enter and for exit the file ctrl+X, now exit the terminal.The proxychains setup is completed.

Tips: Here, SOCKS is an internet protocol that routes packets between a server and a client using a proxy server. and socks4 and socks5 is the type of socks.

127.00.1 is the loopback Internet protocol (IPaddress also referred to as the localhost.

9050 is port number and By default, Tor listens on this port for socks proxy.

Now Restart your machine,

To start proxychains first restart the tor service and then launch proxychains in firefox with a link for a particular search engine like bing, duckduckgo. Use the following commands:

root@kali:~# service tor restart


root@kali:~# proxychains firefox

After running the following commands firefox will launch and will load. When you run the command you must not get any error and bing should get loaded. Also please close all firefox tabs before executing the commands.

You can see that after executing the proxychains bing loaded with some other language. Now let’s do a DNS leak test by searching DNS leak test and open any website providing the same.

You can see that my location is now changed from INDIA to GERMANY and the good thing is that proxychains keep on changing my IP address in a dynamic way without leaking my DNS. so that it provides good anonymity.

If you want that you see a different result then you can just close the firefox and clear the terminal, restart tor service and again launch proxychains you will see some different results in DNS leak test as shown below:

This is the result which we got after restarting tor service. Now If you facing any issues just comment.


Proxying is an important skill or way if you working in infosec, you have to know about proxying, how to work proxies, and how to get your goal using proxies. ProxyChains is a simple and vastly used tool that helps you to hide your self using proxies. Good luck!

Important Things To Remember:

The author of this article does not promote any illegal activities It is just for education purpose All the activities provided in this article, YouTube channel, and on the website computers technicians are only for educational purposes.

If you are using and follow this tutorial for any illegal purpose, computers technicians can not be responsible for your action.

Leave a Reply