proxychains

Installation
sudo apt install proxychains4Command execution
proxychainspreloads a library (LD_PRELOAD) that hooks system network calls likeconnect().When your program tries to open a TCP connection:
proxychainsintercepts it.Instead of connecting directly to the target, it connects to a proxy listed in your config (
proxychains.conf).
If the first proxy is available, the connection is forwarded through it; otherwise, it tries the next proxy (unless using strict chaining mode).
If you have a chain of proxies, the data is forwarded hop by hop until it reaches the final destination.
Configuration
Edit the file /etc/proxychains.conf for system-wide ~/.proxychains/proxychains.conf per-user (optional).
For the specification of another configuration file:
Your traffic will go through the first available proxy in the list.
If
chainmode is enabled, traffic must pass through all proxies in order.
Modes of operation
dynamic_chain
Random proxy per connection
Skips unavailable proxies
strict_chain
Chained proxies
Must pass through all in order
proxy_dns
DNS through proxy
Avoids DNS leaks
quiet_mode
Silent output
Suppresses logs (optional)
Types of proxies supported
proxychains supports proxies over:
socks4socks5http
Example - Configuration file
Network configuration

Method 1
strict_chain: traffic MUST go through all the proxies in order

/etc/proxychains.conf on PC
Only TCP-using commands are affected by proxychains (e.g. curl example.com, ssh remotehost, etc.)
Local-only commands like whoami, pwd, ls, etc., are completely unaffected.
Method 2
strict_chain: traffic MUST go through all the proxies in order

/etc/proxychains.conf on PC
To execute local commands, connect using SSH to the last proxy instead of opening a SOCKS proxy and then from that session, execute the commands.
proxychains is a tool to force any TCP application to go through a proxy (SOCKS or HTTP).
It intercepts network calls made by programs.
Works even if the program doesn’t natively support proxies.
Useful for anonymizing connections, routing traffic through specific hosts, or chaining multiple proxies.
Last updated