TorGhost is a lightweight, efficient anonymity tool designed to route all your network traffic through the Tor network. Unlike a simple browser proxy, TorGhost uses IPTables to redirect all system traffic (TCP/UDP), ensuring total system-wide anonymity.
This version (v3.3.0) has been MODDED & OPTIMIZED by INTELEON404 for:
- Super Fast Performance: Optimized start/stop logic (connects in seconds).
- Clean Terminal Output: No emojis, no box-drawing characters. Plain, readable ASCII output with aligned status blocks.
- Stability: Fixed dependency issues on Kali Linux 2023+ and Debian 12.
- Cross-Distro Support: Auto-detects the Tor user across Debian, Arch, Fedora, and more.
- Kill Switch: Blocks all traffic if Tor fails, preventing accidental exposure.
- System-Wide Routing: Redirects all internet traffic through Tor via IPTables.
- DNS Leak Protection: Prevents your real DNS from leaking outside the tunnel.
- Identity Switching: Request a new Tor Exit Node (new IP) instantly via Tor's control port.
- Kill Switch: Rejects all non-Tor traffic if the daemon fails.
- Auto-Update Check: Built-in checker to compare against the latest GitHub release.
- Atomic File Writes: DNS and torrc changes use safe atomic writes with automatic backup and restore.
- Graceful Interrupt Handling: SIGINT/SIGTERM trigger automatic cleanup of iptables and DNS.
- Linux system (Kali Linux, Parrot OS, Ubuntu, Debian, Arch, Fedora, etc.)
- Root privileges (
sudo) - Python 3.6+
1. Clone the repository:
git clone https://github.com/INTELEON404/torghost.git
cd torghost2. Install system dependencies:
# Debian / Ubuntu / Kali
sudo apt install tor iptables
# Arch Linux
sudo pacman -S tor iptables
# Fedora / RHEL
sudo dnf install tor iptables3. Install Python dependencies:
pip3 install requests stem packaging4. Make executable:
chmod +x torghost.pyUSAGE:
sudo python3 torghost.py [OPTION]
OPTIONS:
-s, --start START TORGHOST Route all traffic through Tor
-r, --switch SWITCH IDENTITY Request new Tor exit node
-x, --stop STOP TORGHOST Restore original connection
-u, --update CHECK UPDATE Check for new version
-i, --ip SHOW IP Display current IP address
-h, --help HELP MENU Show this help message
Routes all traffic through Tor and displays a status report:
sudo python3 torghost.py -sExample output:
============================================================
[ STATUS REPORT ] [ TORGHOST ACTIVE - YOU ARE ANONYMOUS ]
============================================================
> YOUR IP : 192.42.116.101
> TOR STATUS : VERIFIED
> TRAFFIC : All traffic routed through Tor
Use 'sudo python3 torghost.py -r' to switch identity
Use 'sudo python3 torghost.py -x' to stop TorGhost
============================================================
Changes your Tor Exit Node to get a fresh IP address:
sudo python3 torghost.py -rFlushes IPTables rules and restores your original connection:
sudo python3 torghost.py -xDisplays your current IP and whether Tor is active:
sudo python3 torghost.py -iCompares your local version against the latest GitHub release:
sudo python3 torghost.py -u- Writes a custom
torrcto/etc/tor/torghostrcwithTransPort,DNSPort, andControlPortconfigured. - Backs up
/etc/resolv.confand points DNS to127.0.0.1to prevent DNS leaks. - Starts the Tor daemon under the system Tor user (
debian-tor,tor, etc.). - Applies IPTables rules to:
- Allow Tor user traffic to bypass the redirect.
- Redirect all DNS (UDP 53) through Tor's DNS port.
- Redirect all TCP traffic through Tor's transparent proxy port.
- Reject everything else (kill switch).
- Verifies the connection via
check.torproject.org.
On stop, all rules are flushed, DNS is restored from backup, and Tor is shut down.
- Always verify your IP after starting with
-i. - Use HTTPS websites for maximum security.
- Some services may block known Tor exit nodes.
- DNS leaks are prevented automatically via IPTables and DNS redirect.
- The kill switch (
iptables -A OUTPUT -j REJECT) is active on failures. - If interrupted (Ctrl+C), cleanup is performed automatically.
Caution
This tool is for EDUCATIONAL PURPOSES ONLY. The developer (INTELEON404) is not responsible for any misuse or illegal activities performed using this tool. Use it responsibly and legally to protect your privacy.
Warning
TorGhost modifies IPTables and DNS settings system-wide. Use carefully and always verify your connection after enabling Tor routing.
- Original Author: SusmithKrishnan
- Modded & Optimized By: INTELEON404
