Force all system traffic through the Tor network.
TorGate is a transparent proxy tool for Debian-based Linux systems that routes every connection through Tor — not just your browser, but all traffic from every application on your system. If Tor goes down, all traffic is blocked. Nothing leaks.
- Transparent proxy — all system traffic routed through Tor via iptables
- Kill switch — if Tor disconnects, all traffic is blocked (no leaks)
- DNS protection — all DNS queries routed through Tor
- MAC spoofing — randomizes MAC addresses on all active interfaces
- IPv6 disabled — prevents IPv6 leak vectors entirely
- Bridge support — obfs4, snowflake, and meek_lite for censored networks
- Safe rollback — Ctrl+C during startup or any failure restores your original settings
- Debian-based Linux (Ubuntu, Kali, Mint, etc.)
- Root access
Support for Arch, Fedora, and other distributions is coming soon.
git clone https://github.com/rezacho/torgate.git
cd torgate
sudo ./install.shThe installer handles all dependencies automatically (tor, obfs4proxy, snowflake-client, curl).
# Start — route all traffic through Tor
sudo torgate start
# Check status and your Tor exit IP
sudo torgate status
# Stop — restore normal connection
sudo torgate stopIf Tor is blocked in your network, use a bridge to bypass censorship:
sudo torgate start -o # obfs4 — fast, defeats DPI (recommended)
sudo torgate start -s # snowflake — looks like video chat
sudo torgate start -m # meek_lite — hardest to block, slowestBefore using bridges, add your bridge lines to the config file:
sudo nano /etc/torgate/torgate.confGet free bridges from:
- https://bridges.torproject.org
- https://t.me/GetBridgesBot
- Email
bridges@torproject.orgwith:get transport obfs4
Note: Do not include the
Bridgeprefix that torproject.org provides. Useobfs4 1.2.3.4:443 ...notBridge obfs4 1.2.3.4:443 ...
Starting — TorGate backs up your current network settings, then:
- Spoofs MAC addresses on all active interfaces
- Disables IPv6 system-wide
- Configures iptables to redirect all TCP through Tor's TransPort and all DNS through Tor's DNSPort
- Sets default iptables policy to DROP — only Tor can reach the internet
- Starts Tor and verifies the connection
Stopping — TorGate restores everything to its original state:
- Stops Tor
- Restores iptables, DNS, torrc, and MAC addresses
- Re-enables IPv6
To see full Tor logs during startup (useful for debugging):
sudo torgate start -v
sudo torgate start -o -v # combine with bridge optionsudo torgate uninstallOr use the standalone uninstall script:
sudo ./uninstall.shTorGate provides strong system-level anonymity, but keep in mind:
- Browser fingerprinting can still identify you
- Application protocols like torrents can leak identity
- Personal accounts — logging into identifiable accounts defeats anonymity
This project is licensed under the GNU General Public License v3.0.