Proxychains & SOCKS Configuration
Config File Path
On most Linux systems, Proxychains uses:
/etc/proxychains.conf
You can quickly inspect the last lines (where you usually add SOCKS proxies) with:
tail -4 /etc/proxychains.conf
Basic SOCKS Configuration
Add these lines to the bottom of /etc/proxychains.conf:
socks4 127.0.0.1 9050
socks5 127.0.0.1 1080
When using tools like chisel that expose a local SOCKS5 proxy on port 1080, you can also add:
127.0.0.1 socks5 1080
This ensures that tools wrapped in
proxychainswill send traffic through your SOCKS listener.
Example Usage
Run Nmap through a SOCKS proxy:
proxychains nmap -v -sn 172.16.5.1-200
Run Metasploit through a SOCKS proxy:
proxychains msfconsole
Open Firefox and route traffic via SOCKS:
proxychains firefox-esr :80
These commands rely on a correctly configured SOCKS entry in /etc/proxychains.conf.