1

When I try to host a regular server on my computer using my cellular network as an internet source, the webpages aren't seen by others because it's behind a NAT. However, when I hosted an onion website, it was available to everyone with a Tor browser.

How is this happening? And also, is it possible to exploit this to host a regular website that can be accessed by anyone not in my LAN?

1

The main idea is that the onion service only makes outbound connections. Whenever it communicates with someone, the onion service creates a circuit to some relay and receives communication from the end of that circuit. This way the relay accepts new connections (through introduction and rendezvous points) and forwards information to the onion service through the circuit it created. Therefore any data the service receives is through any outgoing connections/circuits it created.

If you wanted an analogy to a non-Tor network, it would be like running a lightweight web server on a VPS, and running your actual web server at home behind a firewall. Your home server would make a persistent outgoing connection (reverse tunnel) to your VPS. When your VPS received a new connection from a client, it would forward any data through your tunnel to your home server.

  • Ah, that explains it. It also explains why I kept consistently losing my internet data even though there were no server requests. – Pradyoth Shandilya Feb 8 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.