How To Use Proxychains

How To Use Proxychains

ProxyChains Tutorial – Linux Hint


  • No logs
  • Kill Switch
  • 6 devices
  • Monthly price: $4.92


There are a lot of “hackers” around the world, some are good, and some are evil. The evil, hack either for money, stealing or just for fun. They like to create havoc in the cyber world or spread malware. The good also could do hacking for money, but in the right way, such as taking part in a bug bounty program, help others to backup lost data, or learn what vulnerabilities exist to educate administrators, etc. What i mean by hacker here is not solely limited to whom are able to break into restricted access. They are an IT expert who has the capability to manage the company’s property security.
Hackers want to be anonymous and hard to be detected while doing their work. Tools can be used in order to hide the hacker’s identity from being exposed. VPN (Virtual Private Network), Proxyservers and RDP (Remote Desktop Protocol) are some of the tools to guard their identity.
In order to do penetration testing anonymously and decrease the possibility of identity detection, hackers need to use an intermediary machine whose IP address will be left on the target system. This can be done by using a proxy. A proxy or proxy server is a dedicated computer or software system running on a computer which acts as an intermediary between an end device, such as a computer and another server which a client is requesting any services from. By connecting to the Internet through proxies, the client IP address will not be shown but rather the IP of the proxy server. it can provide a client with more privacy then if simply connecting directly to the Internet.
In this article, i will discuss about a built-in anonymity service in Kali Linux and or others penetration testing based systems, it is Proxychains.
Support SOCKS5, SOCKS4, and HTTP CONNECT proxy servers.
Proxychains can be mixed up with a different proxy types in a list
Proxychains also supports any kinds of chaining option methods, like: random, which takes a random proxy in the list stored in a configuration file, or chaining proxies in the exact order list, different proxies are separated by a new line in a file. There is also a dynamic option, that lets Proxychains go through the live only proxies, it will exclude the dead or unreachable proxies, the dynamic option often called smart option.
Proxychains can be used with servers, like squid, sendmail, etc.
Proxychains is capable to do DNS resolving through proxy.
Proxychains can handle any TCP client application, ie., nmap, telnet.
Instead of running a penetration test tool, or creating multiple requests to any target directly using our IP, we can let Proxychains cover and handle the job. Add command “proxychains” for every job, that means we enable Proxychains service. For example, we want to scan available hosts and its ports in our network using Nmap using Proxychains the command should look like this:
proxychains nmap 192. 168. 1. 1/24
Lets take a minute to break up the syntax above:
– proxychains: tell our machine to run proxychains service
– nmap: what job proxychains to be covered
– 192. 1/24 or any arguments needed by certain job or tool, in this case is our scan range needed by Nmap to run the scan.
Wrap up, the syntax is simple, as it is only adds proxychains on start of every command. The rest after the proxychain command is the job and its arguments.
Before we are using proxychains, we need to setup proxychains configuration file. We also need a list of proxy server. Proxychains configuration file located on /etc/
Open file in your desirable text editor and set up some configuration. Scroll down until you reach the bottom, at the end of file you will find:
[ProxyList] # add proxy here…
# meanwile
# defaults set to "tor"
socks4 127. 0. 1 9050
By default proxychains directly sends the traffic first through our host at 127. 1 on port 9050 (the default Tor configuration). If you are using Tor, leave this as it is. If you are not using Tor, you will need to comment out this line.
Now, we need to add more proxies. There are free proxy servers on the Internet, you may look at Google for it or click this link Here I am using NordVPN free proxy service, as it has very detailed information on their web site as you see below.
Comment the default proxy for Tor if you are not using Tor then add the proxy on Proxychains config file, then save it. it should look like this:
Dynamic chaining will enable us to run our traffic through every proxy on our list, and if one of the proxies is down or not responding, the dead proxies are skipped, it will automatically go to the next proxy in the list without throwing an error. Each connection will be done via chained proxies. All proxies will be chained in the order as they appear in the list. Activating dynamic chaining allows for greater anonymity and trouble-free hacking experience. To enable dynamic chaining, in the configuration file, uncomment “dynamic_chains” line.
Random chaining will allow proxychains to randomly choose IP addresses from our list and each time we use proxychains, the chain of proxy will look different to the target, making it harder to track our traffic from its source.
To activate random chaining comment out “dynamic chains” and uncomment “random chain”. Since we can only use one of these options at a time, make certain that you comment out the other options in this section before using proxychains.
You may also want to uncomment the line with “chain_len”. This option will determine how many of the IP addresses in your chain will be used in creating your random proxy chain.
Ok, now you know how hackers use proxychains to cover their identity and stay anonymous without worrying about being detected by target IDS or forensic investigators.
About the author
Hy, I am Bima, i am a Freelance Writer and Penetration Tester. Do you have any questions or sharable opportunities? Contact me personally on: dk3ferdiandoo [AT] How to Setup PROXYCHAINS in Kali-Linux by Terminal

HTTP Rotating & Static

  • 200 thousand IPs
  • Locations: US, EU
  • Monthly price: from $39
  • 1 day moneyback guarantee


How to Setup PROXYCHAINS in Kali-Linux by Terminal

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 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 Switch to ROOT usersudo -iType your password and enter, Now you’re in Root user. so type, [email protected]:~# service tor satusIf you get this output that means TOR is not installed in your system and not running, Means TOR is installed in your system and apt-get install torWe 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 TOR Successfully installs then, Start TOR service tor startNow to check the TOR service service tor statusctrl +c for If you want to stop TOR service, type service tor stopAfter installing tor service now we need to configure proxychains. To do so use the following you must in ROOT user. if you do not then switch to nano /etc/nfYou see this type of file in the terminal. you will see “#” which means bash language comments. if 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 you see in this there are three types of proxychains: 1)dynamic 2)strict 3)randomwe’re going to use dynamic chain, Remove Dynamic chain from commentcomment Strict chain and Random chainRemove proxy DNS from commentAlso, Remove Proxy DNS requests — no leak for DNS data from commentTips: here removing proxy DNS and no leak for DNS data, helps you to fully anonymous. 3. Now, write socks5 127. 0. 1 9050 in the last line of the proxy just write save by ctrl+o and enter and for exit the file ctrl+X, now exit the proxychains setup is 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. 1 is the loopback Internet protocol (IP) address also referred to as the localhost. 9050 is port number and By default, Tor listens on this port for socks 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:[email protected]:~# service tor restartNow, [email protected]:~# proxychains firefox 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 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 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 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.
How to Use Proxychains to Redirect Traffic Through Proxy ...

How to Use Proxychains to Redirect Traffic Through Proxy …

Sometimes we install a proxy server, but only certain programs such as Firefox and Google chrome provide proxy settings. Luckily, we can use a command line utility called proxychains to redirect any program to go through our proxy server. This tutorial will show you how to set it up on Debian, Ubuntu, OpenSUSE, Fedora, CentOS/Redhat, Arch Linux and their derivatives.
If your don’t know how to set up a proxy server, then check out this post to learn shadowsocks proxy. After that, come back here.
Install proxychains on Linux
Debian/Ubuntu/Linux Mint/Elementary OS
sudo apt-get install proxychains4
OpenSUSE Leap
proxychains is available from the packman repository.
sudo zypper install proxychains
sudo dnf install proxychains
sudo yum install proxychains
sudo pacman -S proxychains-ng
On kali linux, proxychains is installed by default.
Add a Proxy Server to Proxychains
Open the configuration file.
sudo nano /etc/
At the end of the file, add your proxy like this
socks5 127. 0. 1 1080
socks5 is the proxy type, you can add other types as well such as,, socks4 etc. depending on your situation. 127. 1 is the proxy host, and 1080 is the port on which proxy server listens. Again, change them to your specific situation.
The default proxy is socks4 127. 1 9050 which you can safely remove.
Set a Default DNS Server
It’s highly recommended that you change the default 4. 4. 2. 2 DNS server to something else, such as Google’s DNS server 8. 8. 8/8. Or OpenDNS server 203. 67. 222. 222/203. 220. Open the resolv configuration file.
sudo nano /usr/lib/proxyresolv
Linux Mint/Elementary OS
sudo nano /usr/lib/proxychains3/proxyresolv
sudo nano /usr/bin/proxyresolv
Find the following line
Change its value to something like 8. Then save and close the file. On Arch Linux, there’s no proxyresolv config file.
Just prepend proxychains to any command you execute like the following.
proxychains youtube-dl -citw
If you are using youtube-dl then you may know that it has not built-in support for socks proxy, but Proxychains will redirect youtube-dl to go through the proxy server.
If you want to redirect all your terminal traffic through proxy server, then enter start a new shell program with proxychains, like below.
proxychains bash
This command will start another bash shell with proxychains in your terminal and from now on you don’t have to prepend proxychains to your command. Your traffic in this new shell will be automatically redirected through proxy server.
Note: Terminal is different from shell. Terminal is the device that enable you to connect to a host computer whereas shell is a piece of software on the host computer. Shell is a command line interpreter, translating your command to zeros and ones so the computer can understand your command. When a terminal connects to a host computer, a shell program will be automatically started so that the user’s commands can be interpreted by the shell and the computer can understand the user’s commands.
Quiet Mode
By default, proxychains will output its activity to the terminal. If you don’t want to see this information, then you can disable it by editing /etc/ file.
sudo nao /etc/
Remove the hashtag. Save and close the file. Now you will only see the output of the application that is being redirected.
As always, if you found this post useful, please subscribe to our free newsletter or follow us on Google+, Twitter or like our Facebook page

Frequently Asked Questions about how to use proxychains

Share this post

Leave a Reply

Your email address will not be published.