Blog | G5 Cyber Security

Anonymous Network Setup

TL;DR

This guide shows you how to build a basic anonymous network using Tor and SSH tunnels. It’s not foolproof, but it adds layers of privacy by hiding your IP address and encrypting your traffic.

Setting up an Anonymous Network

  1. Choose a Server: You’ll need a server you control (e.g., a VPS from DigitalOcean, Linode, or Vultr). Make sure it’s in a different location than your own.
  2. Install Tor on the Server: Connect to your server via SSH and install Tor.
    sudo apt update
    sudo apt install tor
  3. Configure Tor Hidden Service: Edit the Tor configuration file (usually /etc/tor/torrc) to create a hidden service.
    sudo nano /etc/tor/torrc

    Add these lines at the end of the file:

    HiddenServiceDir /var/lib/tor/hidden_service/
    HiddenServicePort 80 127.0.0.1:80

    (Change port 80 if needed, and adjust the internal IP/port to match your desired service.)

  4. Restart Tor: Restart the Tor service for the changes to take effect.
    sudo systemctl restart tor
  5. Find Your Onion Address: Check the hidden service directory for the onion address (hostname).
    cat /var/lib/tor/hidden_service/hostname

    This will output a 16-character alphanumeric string followed by ‘.onion’. Keep this safe!

  6. Set up SSH Tunnel: On your local machine, create an SSH tunnel to the server.
    ssh -D 9050 user@your_server_ip

    (Replace user and your_server_ip with your actual username and server IP address. 9050 is a common port for SOCKS proxies.)

  7. Configure Your Applications: Configure applications (like web browsers) to use the SOCKS proxy at localhost:9050.
    • Firefox: Go to Settings > General > Network Settings > Settings… Choose ‘Manual proxy configuration’ and set SOCKS Host to localhost, Port to 9050.
    • Chrome/Edge: Use a Chrome extension like Proxy SwitchyOmega or launch with command-line flags (less user-friendly).
  8. Verify Your Anonymity: Visit a website that shows your IP address (e.g., whatismyipaddress.com) while using the tunnel and onion address. It should show the server’s IP, not yours.

Important Considerations

Exit mobile version