This repository provides a comprehensive guide to routing all system-wide traffic through Tor on Linux, with instructions for both Rocky Linux and Debian. The guide covers terminal-based tools like curl and browser configuration to ensure all your network traffic is anonymized through Tor.
- Introduction
- Installation
- System-wide Proxy Configuration
- Browser Configuration
- Testing
- Advanced Options
- Contributing
- License
- Support the Project
Tor (The Onion Router) is a free and open-source software that enables anonymous communication by directing internet traffic through a worldwide volunteer overlay network. This guide explains how to configure your system and browser to route all traffic through Tor, enhancing your online privacy.
First, ensure that your system is up-to-date:
sudo dnf update -yNext, install Tor using the following commands:
sudo dnf install epel-release -y
sudo dnf install tor -yEnable and start the Tor service:
sudo systemctl enable tor
sudo systemctl start torFirst, ensure that your system is up-to-date:
sudo apt update && sudo apt upgrade -yInstall Tor using the following command:
sudo apt install tor -yEnable and start the Tor service:
sudo systemctl enable tor
sudo systemctl start torOnce Tor is installed, configure your system to route all traffic through it. This can be done by setting up a system-wide proxy that directs traffic through the Tor SOCKS5 proxy.
Edit your environment variables to include the following:
export http_proxy="socks5://localhost:9050"
export https_proxy="socks5://localhost:9050"You can add these lines to your shell configuration file (e.g., .bashrc, .zshrc) for persistent proxy settings.
- Open Firefox and navigate to
Preferences > General. - Scroll down to the
Network Settingssection and click onSettings. - Select
Manual proxy configurationand enterlocalhostand port9050for both HTTP and HTTPS proxies. - Check the box for
Use this proxy server for all protocolsand clickOK.
- Open Google Chrome or Chromium and navigate to
Settings > Advanced > System > Open Proxy Settings. - In the proxy settings window, configure the SOCKS5 proxy with the address
localhostand port9050. - Save the settings and restart your browser.
- Open Microsoft Edge and go to
Settings > System > Open your computer's proxy settings. - Under
Manual proxy setup, enable the option to use a proxy server. - Enter
localhostas the proxy address and9050as the port. - Save the settings and restart Microsoft Edge.
To test that your traffic is being routed through Tor, use the following command to check your public IP:
curl https://check.torproject.orgThis should confirm that you are using the Tor network.
If you need more advanced configurations, such as specific routing for certain applications or configuring firewall rules, refer to the Tor documentation.
If you have suggestions or improvements, feel free to submit a pull request or open an issue in this repository.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you found this guide helpful and would like to support the project, consider making a donation. Your contributions help maintain and improve this resource.