This page describes how to install, configure and use proxychains-ng. Proxychains hooks network-related libc functions in dynamically linked programs via a preloaded DLL (dlsym(), LD_PRELOAD) and redirects the connections through SOCKS or HTTP proxies.

It supports TCP only (no UDP/ICMP etc). This should be used only in dynamically linked programs that are well known, use C or C++ language. Consider using anonsurf it uses iptables to redirect all traffic.

Proxychains-ng uses a list of proxies to make harder to trace and can be used with tor.


To install proxychains-ng;

prt-get depinst proxychains-ng


Configuration file is at /etc/proxychains.conf, Set strict_chain or dynamic_chain, strict will loop all the proxies and all must be online, dynamic skip the ones offline. To test set dynamic;


Round robin will use a proxy after another and return to first one once the last is reached. Random each connection will be done with a random proxy. Adjust chain_len if random or robin is used.

Set proxy_dns to proxy dns requests and avoid dns leaking. Skip to [ProxyList], default is to use tor, to use proxies check this lists; http / https and socks. Select some and then edit /etc/proxychains.conf;

# add proxy here ...
# meanwile
# defaults set to "tor"
#socks4 9050

# Argentina
http 53281

# Brazil
http 8080

# Chile
http 443

# Chile
socks5 4145

How to use

Test configuration;

$ proxychains4 curl
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/
[proxychains] DLL init: proxychains-ng 4.14
[proxychains] Dynamic chain  ...  ...  timeout
[proxychains] Dynamic chain  ...  ...  ...  ...  OK$

As you can see above it returned ip of the proxy. To use other configuration;

$ proxychains4 -f ~/proxychains.conf curl

To scan a host using proxychains;

$ proxychains4 nmap -sS