Skip to content

ProxyChains-NG

8 commands

Forces any program’s TCP traffic through a chain of SOCKS or HTTP proxies — the standard way to run tools across a SOCKS pivot.

  • pivoting
  • SOCKS
  • proxy

Install ProxyChains-NG

sudo apt install proxychains4

Configuration3

cat /etc/proxychains4.conf

The config file. The proxy list at the bottom defines the chain; add `socks5 127.0.0.1 1080` to use a SOCKS proxy from chisel or SSH.

set dynamic_chain in the config

Dynamic chain skips dead proxies; strict_chain requires every proxy in order; random_chain picks a random subset.

set proxy_dns in the config

Resolves DNS through the proxy so internal names work and you do not leak lookups.

Running tools4

proxychains <command>

Routes a command’s TCP connections through the configured proxy chain.

Link
proxychains -q <command>

Quiet mode, without the per-connection output.

Link
proxychains nmap -sT -Pn -n <target>

Scans through the proxy. Use -sT (full connect) and -Pn, since SOCKS cannot carry raw SYN or ICMP.

Link
proxychains -f <conf> <command>

Uses an alternate config file.

Link

Tips1

ssh -D <port> <user>@<host> then use socks5 127.0.0.1 <port>

SSH dynamic forwarding provides a SOCKS proxy that proxychains can use directly.

Link