Opened 9 years ago

Closed 8 years ago

Last modified 3 years ago

#1775 closed enhancement (implemented)

Make Tor speak UPnP and NAT-PMP for port-forwarding

Reported by: sjmurdoch Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: #1752 Points:
Reviewer: Sponsor:

Description (last modified by sjmurdoch)

We want it to be as easy as possible for people to configure a Tor bridge (see #1752), and part of the difficulty is getting their router to do port forwarding. Vidalia supports UPnP automatic port forwarding, but this is no good for headless servers and these are probably the ones which make the most reliable bridges. UPnP also doesn't work on Apple networking hardware.

We should therefore implement UPnP and NAT-PMP (for Apple hardware) inside Tor itself. This should automatically configure port forwarding, and maintain it over router reboots. Including the UPnP/NAT-PMP libraries should be a build-time option in case some platforms don't support the libraries or the user simply doesn't want them available.

Development is currently happening in this Git branch: https://gitweb.torproject.org/sjm217/tor.git/shortlog/refs/heads/upnp

Child Tickets:

#1900
Create tor-fw-helper.c
#1903
Teach Tor to control networks with tor-fw-helper.c
#1983
Port tor-fw-helper to Windows
#2029
Set FD_CLOEXEC on all open file descriptors so that they are closed on exec()
#2030
Make tor_check_port_forwarding more generic


Child Tickets

TicketTypeStatusOwnerSummary
#1900enhancementclosedCreate tor-fw-helper.c
#1903enhancementclosedTeach Tor to control networks with tor-fw-helper.c
#1983enhancementclosedsjmurdochPort tor-fw-helper to Windows
#2029defectclosedsjmurdochSet FD_CLOEXEC on all open file descriptors so that they are closed on exec()
#2030defectclosedsjmurdochMake tor_check_port_forwarding more generic

Change History (10)

comment:1 Changed 9 years ago by sjmurdoch

Description: modified (diff)
Parent ID: #1752

comment:2 Changed 9 years ago by nickm

I have a branch "tor-fw-squashed2" in my public that compresses tor-fw-helper down to a smaller number of commits and fixes a couple of issues. sjmurdoch is reviewing now.

comment:3 Changed 9 years ago by arma

Component: Tor ClientTor Relay

comment:4 Changed 9 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:5 Changed 8 years ago by karsten

Summary: Project: Make Tor speak UPnP and NAT-PMP for port-forwardingMake Tor speak UPnP and NAT-PMP for port-forwarding
Type: taskproject

comment:6 Changed 8 years ago by nickm

Type: projectenhancement

comment:7 Changed 8 years ago by nickm

Resolution: implemented
Status: newclosed

I'm calling the remainder of this (make it handle incomplete lines) an 0.2.4.x enhancement, since it's looking complex and tricky. This part is implemented; closing it. To the extent that there are bugs, they get their own tickets.

comment:8 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:9 Changed 7 years ago by nickm

Component: Tor RelayTor

comment:10 Changed 5 years ago by federico3

tor-fw-helper.c is not being built currently, see #5213

Note: See TracTickets for help on using tickets.