Proxychains¶
Introduction¶
Proxychains is a tool that allows you to redirect network traffic of an application through one or more proxy servers. Instead of using a single proxy, it can use multiple proxies in a chain, making it much harder to trace the real IP address.
This is particularly useful in ethical hacking and penetration testing where anonymity is required.
Installation¶
Install Proxychains with the following command:
Key Configuration Parameters¶
-
dynamic_chain
-
When enabled, Proxychains will dynamically choose proxies from the list.
-
If one proxy is offline, it will automatically skip to the next.
-
Recommended for practical usage because free proxies often go down.
Example:
dynamic_chain -
-
strict_chain
-
Proxychains will use proxies in the exact order listed.
-
If one proxy fails, the entire chain will fail.
-
Useful when you need a strict sequence of proxies.
Example (usually commented out if using dynamic_chain):
# strict_chain -
-
proxy_dns
-
Ensures that DNS queries are also routed through the proxy servers instead of leaking from your local ISP.
-
Without this, your domain lookups may reveal your original IP even if traffic is proxied.
Example:
proxy_dns -
-
tcp_read_time_out and tcp_connect_time_out
-
These define how long Proxychains should wait before timing out.
-
Useful to prevent tools from hanging when proxies are slow or unresponsive.
Example:
tcp_read_time_out 15000 tcp_connect_time_out 8000 -
-
[ProxyList] Section
-
This is where you specify the proxies you want to use.
-
Format:
<proxy_type> <ip_address> <port> -
Supported proxy types:
socks4,socks5,http.
Example:
socks5 127.0.0.1 9050 http 192.168.1.1 8080 socks4 36.66.210.159 44034 -
Configuration¶
The configuration file is located at:
/etc/proxychains.conf (or /etc/proxychains4.conf in some systems).
-
Open the configuration file in a text editor:
-
Change the chain type:
-
Find the section with
strict_chainanddynamic_chain. -
By default,
strict_chainis enabled, anddynamic_chainis commented. -
Comment out
strict_chainand uncommentdynamic_chain.-
strict_chain: Proxychains will stop working if one proxy in the chain is down. -
dynamic_chain: Proxychains will skip dead proxies and continue with the available ones.
-
Example:
-
-
Enable DNS proxying:
Find the line withproxy_dnsand uncomment it. This ensures DNS queries also go through proxies. -
Add proxy servers under the
[ProxyList]section at the bottom of the file. Proxies are added in the format:Example:
socks4 36.66.210.159 44034 socks4 182.52.51.19 32591 socks4 167.249.78.22 4145 socks4 91.195.158.171 4145 socks4 45.4.255.168 4145 socks4 31.145.166.28 4145You can find free proxy lists by searching “proxy server list” on the internet.
-
Save and exit the file:
-
Press
Ctrl+Oto save. -
Press
Ctrl+Xto exit.
-
Usage¶
Once configured, run any application through Proxychains by prefixing it with proxychains.
Examples:
-
To open a browser anonymously:
-
To run Nmap with proxies:
-
To run SQLmap: