Setting Up Proxy Chains In Kali Linux

DISCLAIMER:The content you are about to access is for educational purposes and research aims. I am not responsible for your action, when you are “proxied”

Okay, HAHA!!, Let’s Roll

What is a Proxy Chain?

Proxy: Imagine you are being pursued, during that pursuit, you get really exhausted and want to take a break but you can’t. Suddenly, you see a small bush and you decide to hide behind that bush, so that the person pursuing you does not see you. That bush is the Proxy. In technical terms, A proxy is a server that hides users from the Internet. It sits in front of a group of user machines. When those computers make requests to sites and services on the Internet, the proxy server intercepts those requests and then forwards this request to destination web servers on behalf of those clients, just like a middleman.

Chain: For something to be called a chain, it should be forming nodes/knots/links in between from one end to another.

That drives us to a proxy chain. For a clear grasp, think of it as a link of bushes. Proxy Chains allow you to work through a chain of proxy servers. Technically, the connection to a remote host will be performed sequentially from one proxy server to another. Basically, it is a more secure Virtual Private Network(VPN). The principle of a VPN is that it creates a private network for your internet connection by providing a secure and encrypted connection to send your data via the internet. The parental difference between a VPN and proxy chain is; VPN’s employ only one proxy between the destination address and the user while the proxy chain links multiple proxies. This means that your connection will definitely go through different proxies before landing the final destination.

Let’s look at the disadvantage of direct Pc-Server connection:

                        direct connect with the

     Computer ——————————>> Server

The server is gladly and happily aware of:

–>Your external IP address: This piece of information is enough to find out your approximate location geographically. 

–>The Browser you are using and what extensions you have installed. This is because, every time you visit a website, the browser sends a User Agent String which can be used to identify a browser version and the Operating System Version

–>Aware of the cookies you have on your computer. Cookies can be blocked, well and good, but there are programs that use HTTP which won’t let you tamper with those settings. 

Now this is where you get into your keys and drive your proxy. Hehe.

            Traffic         Altered Traffic

       Computer———————–>Proxy————————–> Server

These are the key benefits:

–>The interesting feature is that it can not only be used as a filter but also again filters. Isn’t that amazing?

–> Your IP is not disclosed because it is the proxy connecting to the server and not you.

–>It can replace the User Agent String with another string of less meaning.

–>It can alter ads from websites before they reach your computer.


Setting up Proxychains in Kali Linux

Good News!!!Proxy-chains come pre-installed for Linux systems. All you need to do is wake them up. The tool redirects TCP connections through proxies for example TOR, SOCKS4, SOCKS5, and HTTP (S). and it allows us to chain proxy servers. 

     To set up proxy chains you will first need the tor service, and here comes more good news, the service is pre-installed. 

To find out whether tor service is available or not, use this command:

→ Make sure you are root

→ Type this command in terminal: service tor start followed by service tor status to see the current status

If you get the above output, then tor service is active and running. 

→ We can then cancel the current task in terminal by executing CTRL+C

  • Still in root and in terminal—→Lets configure the proxy chains

1. Locate the proxy chain configuration file:

    Use the         locate proxychains      command.

The reason we use the above command is because yours could be in different spots, so that command can help you find them.

NB:The first option is where your proxy chain is located and that’s the file we are going to edit.

Type this command to edit the configuration file.

$sudo vi /etc/proxychains4.conf   

This should be what you see.

So, let me explain what you see. There are three main modes we can run the proxy chain. Dynamic, Static and Random. We shall ignore the strict_chain so we shall comment it out.

  • As for the dynamic_chain case, we put a list of proxies in, let’s say six proxies. What this chain will do is to go through all these proxies in the order you have put them in, unless one is not accessible, then it will go for the next proxy following it.
  • Random speaks for itself, it picks the proxies randomly. 

#So let’s use the dynamic_chain.

-→Put the cursor on the d before the word dynamic chain and hit i for insert, followed by the backspace key to remove the octorthope(#). This makes the configuration active.

-→Do the reverse on a strict chain by adding the octorthope to disable it.

→ Okay, Scroll down through your terminal to the proxy_dns option. It’s enabled by default.

→ Further Scroll down to our list of proxy servers.

The format is:   type     server ip address     port

We shall not edit anything there. At the bottom of the terminal screen, you probably notice something right?

  • So, By default, the proxy server is using tor service and is pointing to, which is the loopback address, which is actually pointing to us. Daang daang daaaaang!!!

Don’t worry. We can exclude it from the proxy by commenting it out.

–>Just below it, put your server in with this command socks4  {Host_IP} port

then hit escape——-→   :wq (write and quit) then hit enter, and that’s it.


        NOTE:Whenever you want to use the proxy chains, use the proxychain command, then browser to be used, followed by site/target

 In terminal, type the following command

      proxychains firefox

Firefox will open, with the target site/IP you specified and all your traffic will be proxied. To find out whether they are actively working, navigate back to the terminal. If your screen looks like this, then you are in!!!

BOOM!!! We are anonymous…

So that’s basically what proxy chains are all about. Anonymity tunneled through a series of servers. In case of any  queries, my inbox is a walkable distance on twitter, @Ogen_01. See you all.

Remember: “The good guys are always right, the bad guys are only right once”

Enon Deogracious Jurence Author