Setting Up Proxychains with Tor on Kali Linux

Proxychains is a tool that forces any TCP connection made by a given application to route through one or more proxies — SOCKS4, SOCKS5, or HTTP(S). When paired with Tor, it allows command-line tools on Kali Linux to route their traffic through the Tor network, anonymizing the source of the connection. This writeup documents the installation, configuration, and verification process, along with practical notes on limitations.

CYBERSECURITY

Leadhand

7/28/20263 min read

1. Prerequisites

  • Kali Linux (rolling release recommended)

  • Root or sudo privileges

  • Internet connectivity

2. Installing Tor

Kali ships Tor in its default repositories.

sudo apt update sudo apt install tor -y

Verify the installed version:

tor --version

3. Starting the Tor Service

Start and enable Tor so it persists across reboots:

sudo systemctl start tor sudo systemctl enable tor sudo systemctl status tor

Expected output should show active (running).

Confirm Tor is listening locally on its default SOCKS port (9050):

sudo ss -tlnp | grep 9050

You should see a line similar to:

LISTEN 0 128 127.0.0.1:9050 0.0.0.0:* users:(("tor",pid=XXXX,fd=X))

4. Configuring Proxychains

Kali includes proxychains4 by default. The configuration file is located at:

/etc/proxychains4.conf

(Older versions may use /etc/proxychains.conf.)

4.1 Open the config file

sudo nano /etc/proxychains4.conf

4.2 Set the chain type

Near the top of the file, only one chain type should be active:

dynamic_chain #strict_chain #random_chain

Mode Behavior dynamic_chain Skips dead proxies, uses remaining live ones in order — recommended for reliability strict_chain Requires every proxy in the list to be alive, in exact order random_chain Randomly selects proxies from the list per connection

4.3 Enable DNS proxying

Ensure this line is uncommented to prevent DNS leaks (DNS requests resolved through Tor rather than the local resolver):

proxy_dns

4.4 Set the proxy list

At the bottom of the file, under [ProxyList], ensure only the Tor SOCKS proxy is listed:

[ProxyList] socks5 127.0.0.1 9050

Remove or comment out any default/leftover entries to avoid conflicting proxy chains.

Save and exit.

5. Verifying the Setup

5.1 Check via Tor's official verification endpoint

proxychains curl https://check.torproject.org

A successful configuration returns a page confirming Tor usage, and the terminal will show proxychains' hop-by-hop log, e.g.:

[proxychains] config file found: /etc/proxychains4.conf [proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4 [proxychains] DLL init: proxychains-ng 4.x S-chain | 127.0.0.1:9050 | OK

5.2 Check IP address change

proxychains curl https://api.ipify.org

Compare against your real public IP to confirm the exit is a Tor node.

5.3 Browser check (optional)

proxychains firefox https://check.torproject.org

6. Usage Examples

Once verified, prefix any TCP-based tool with proxychains (or proxychains4):

proxychains curl https://example.com proxychains ssh user@remote-host proxychains wget https://example.com/file.zip

For network reconnaissance tools such as Nmap, use TCP connect scans only — Tor cannot carry raw sockets or UDP:

proxychains nmap -sT -Pn -p 80,443 target.example.com

7. Limitations and Notes

  • TCP only. Tor cannot handle raw SYN scans (-sS), UDP, or ICMP. Use -sT with Nmap and stick to TCP-based tools generally.

  • DNS leaks. Confirm proxy_dns is active; otherwise, some tools may resolve hostnames outside the Tor circuit, leaking your queries to your local DNS resolver.

  • Application-level leaks. Some applications ignore SOCKS proxy settings for certain features (e.g., WebRTC in browsers), bypassing the chain entirely. Proxychains only affects what it's able to hook into.

  • Speed. Tor's multi-hop routing adds significant latency compared to a direct connection or single proxy.

  • Exit node blocking. Many websites and services actively detect and block known Tor exit nodes, which can affect reliability during testing or scanning.

  • Chaining multiple proxies. Additional lines can be added under [ProxyList] to layer a VPN, other SOCKS/HTTP proxies, and Tor together — but each added hop increases latency without necessarily improving anonymity, since Tor already anonymizes the connection on its own.

  • Legal/authorization scope. Routing scanning or exploitation tools through Tor does not grant authorization to test systems you don't own or have explicit permission to assess. Always operate within the bounds of a signed engagement or your own infrastructure.

8. Quick Reference

Task Command Install Tor sudo apt install tor -y Start Tor sudo systemctl start tor Enable on boot sudo systemctl enable tor Check Tor port sudo ss -tlnp | grep 9050 Edit proxychains config sudo nano /etc/proxychains4.conf Verify via curl proxychains curl https://check.torproject.org Run a tool through Tor proxychains <command>

Summary

Proxychains + Tor gives command-line tools on Kali Linux a straightforward way to route TCP traffic through the Tor network for anonymization. The setup is lightweight — install Tor, confirm it's listening on 9050, point proxychains at that SOCKS5 port, and enable DNS proxying to avoid leaks. The main tradeoffs are reduced speed, TCP-only support, and the possibility of exit-node blocking, all of which should be factored into any workflow that depends on it.v

Stay secure. Stay informed. Stay ahead

© 2025. All rights reserved.