1

I learned from a video that NAT punching is one of the features of Tor. I run GNU/Linux Ubuntu 16.4. I have already installed Tor. It will be great if someone can instruct me how to perform this feature. My home connection does not receive a static IP. It will be great if I could access my home PC from anywhere in the world via Tor.

0

tor has it's "nat helpers" - but they must be enabled during compilation in configure --enable-nat-pmp --enable-upnp script arguments and in torrc it should be explicitly pointed to by using( a cite from official manual):

PortForwarding 0|1

Attempt to automatically forward the DirPort and ORPort on a NAT router connecting this Tor server to the Internet. If set, Tor will try both NAT-PMP (common on Apple routers) and UPnP (common on routers from other manufacturers). (Default: 0)

PortForwardingHelper filename|pathname

If PortForwarding is set, use this executable to configure the forwarding. If set to a filename, the system path will be searched for the executable. If set to a path, only the specified path will be executed. (Default: tor-fw-helper)

  • 1
    Since 0.2.7.x the pure C tor-fw-helper has been removed. Instead a Go version is available which means it is no longer required or recommended to use the C tor-fw-helper because the code isn't "confidence-inspiring". So the autoconf flags are irrelevant. – cacahuatl Oct 11 '16 at 21:18
  • 1
    @canonizingironize and - actually - it's not obsolete and not the only one to do the job. I, myself, use my own helper - neither new one, nor old one. – Alexey Vesnin Oct 11 '16 at 21:22
  • 1
    Sure you can use any code but it's recommended not to use the pure C version, that you recommend, because they lack confidence in the integrity and safety of the code. – cacahuatl Oct 11 '16 at 21:24
  • 1
    I've recommended to enable a standard one to "check the things working" - and no recommendation of sticking up to it. Plese, read the post before complaining to nothing, would you be so kind, please? – Alexey Vesnin Oct 11 '16 at 21:26
  • 2
    It doesn't exist anymore, Alexey. It's obsolete. The flags don't exist. It won't build a copy of tor-fw-helper. It's deprecated. Dead code. You've clearly never build a recent version of Tor while trying what you're recommend to the user in your answer. To wit: configure: WARNING: unrecognized options: --enable-nat-pmp, --enable-upnp – cacahuatl Oct 11 '16 at 21:39
2

The NAT punching properties described in the video, are those of onion services. These are a default property of onion services.

Normally if you've providing a service that you want to be accessible behind some NAT, you have to setup some kind of exception on the NAT device (e.g. a home router) to allow incoming connections to a certain port be forwarded to an address behind the NAT device. However, onion services consist purely of outbound connections so there is no requirement (or recommendation) to configure the NAT device to allow incoming connections.

If you can make outbound connections, then an onion service can receive "inbound" connections, and the NAT device doesn't come into play at all. There are no special configuration steps required, it is a useful side-effect of the architecture of onion services.

The onion service makes an outbound connection to ~3 Introduction Points, it holds those outbound connections open. The client speaks to those introduction points and through them provides a rendezvous point. The onion service makes an outbound connection to the rendezvous point. At no point does the onion service have to receive an inbound connection to operate.

  • could you please tell me how I could use my SSH client (ubuntu terminal) to access my PC at home? what should be the address I should be pinging to? user@whataddress.onion? – Denis Oct 13 '16 at 4:01
  • 1
    Yup, assuming you're running sshd and a tor onion service on the ubuntu server. You'll need to ensure you proxy your ssh properly for this to work, either by using the 'ProxyCommand' option for OpenSSH or torsocks or configuring PuTTY to use Tor's SOCKS Proxy if you're on windows. – cacahuatl Oct 14 '16 at 1:28

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.