TOR Hidden Services

18 Oct 2015 . tech . Comments
#privacy

You’ve probably heard of Tor (The Onion Router) as a tool for anonymous browsing, but did you know it can also help you create completely anonymous web services? Tor is a free, open-source network that routes your traffic through multiple servers, making it nearly impossible to trace back to you.

One of Tor’s most powerful features is the ability to create “hidden services” - web services where the physical location of the server is completely hidden from users. Instead of a regular URL like example.com, users access your service through a special onion address that looks something like abc123def456.onion.

This isn’t just about anonymity for the sake of it - hidden services can be incredibly useful for legitimate purposes like protecting whistleblowers, enabling secure communication in oppressive regimes, or simply keeping your personal projects private.

Setting Up Your Hidden Service

Creating a hidden service provides two key benefits: it protects your server’s physical location and ensures your users’ privacy since they’re connecting through the Tor network. Let me walk you through the setup process.

First, you’ll need to install Tor on your server. Then, you’ll configure the service by editing the torrc configuration file to specify where you want to store your service’s keys and which port it should listen on:

HiddenServiceDir /home/username/hidden-service/
HiddenServicePort 80 127.0.0.1:4000

After restarting the Tor service, you’ll find your service’s onion address (which is essentially your public key) in the HiddenServiceDir/hostname file. This is the address you’ll share with users to access your service.

Important Security Note: If someone gets access to your private key, they can impersonate your service. Make sure to keep your private key secure and never share it with anyone.

Accessing Your Service

To access your hidden service, users simply need to:

  1. Use a Tor browser (like the Tor Browser Bundle)
  2. Paste your onion address
  3. Wait a moment for the connection to establish

The first connection might take a few minutes as the Tor network maps your onion address to your server’s location. This is normal and part of how Tor protects your anonymity.

Important Considerations

While Tor provides excellent anonymity, remember that:

  • Don’t share personal information that could identify you
  • Be aware that there have been concerns about potential NSA capabilities regarding TLS decryption
  • The benefits of using Tor (privacy, censorship resistance) generally outweigh the risks

Have you ever set up a hidden service or used Tor for privacy? I’d love to hear about your experiences and any tips you’ve learned along the way.


Me

Panos is an engineering leader at Panther, with over a decade of experience in cybersecurity and engineering leadership. His career includes security research at CERN, security engineering at Microsoft Office 365, and founding Blocktopus, a KYC/AML startup. He holds patents, has published research in security and machine learning, and has helped scale startups from pre-seed through Series B. On this blog, he writes about security, leadership, and developer productivity.