I was reading an article on how TOR has NAT piercing properties and I need to ask please:

What is NAT piercing (in relation to the TOR network) and how does NAT piercing help the TOR network.

And also, is NAT piercing the same as NAT punching? I see NAT punching come up in search results when I search for NAT piercing


"NAT piercing" aka "UPNP punching" is the way to open a port on a NAT router to be forwarded back to you. It needs an "upnp-helper" that can be configured inside the torrc config. The original upnp-helper is still available in a source code, but iy's a way too obsolete. My advice to you - make a static IP+port mapping, it works just fine, but if you're explicitly needing the piercing functionality - make your own helper, running as an independent service

  • Thank you for your response. In a bid to convey my question right. Let's consider the statement 'TOR has NAT-piercing properties'. Does this mean that a computer hosting a .onion address behind a NAT is accessible to the outside world/network without having to set up port forwarding on the router? I know that in the case of setting up an ordinary web server on a computer behind a NAT, you would need to set up port forwarding. Does this case apply to Tor? Still trying to personally set up a tor server behind a NAT so this would be clearer for me.
    – Samuel OA
    Nov 19 at 17:08
  • Yes, if NAT will be "pierced" or "UPNP-punched" - it will be a temporary port forwarding set up. The end result is always the same : a LAN IP address with an open port is visible from outside via port forwarding. If you're doing as I suggested - the static address and the static port forwarding rule - you're doing it once and it works. If you're piercing nat - you're doing exactly the same thing each time you're starting Tor
    – Alexey Vesnin
    Nov 20 at 20:19
  • Okay. Thank you so much, will check out and revert
    – Samuel OA
    Dec 3 at 12:50

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.