Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#1963 closed task (implemented)

Make tor-fw-helper summarize success status

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

Description

When tor-fw-helper runs, it outputs various status information to stdout, but it is hard to tell, given this, whether it actually succeeded in punching a hole in the firewall.

I think the right place to put this logic would be in tor-fw-helper, in such a way that Tor can parse this and output a suitable log message.

Port forwarding should be considered to have succeeded if either UPnP or NAT-PMP succeeded.

Child Tickets

Change History (4)

comment:1 Changed 9 years ago by ioerror

Status: newneeds_review

I've summarized the output as follows:

./tor-fw-helper -g tor-fw-helper: NAT-PMP sendpublicaddressrequest returned 2 (SUCCESS)tor-fw-helper: ExternalIPAddress : 1.2.3.4tor-fw-helper: UPnP GetValidIGD returned: 1 (SUCCESS)tor-fw-helper: ExternalIPAddress = 1.2.3.4./tor-fw-helper -i 9090tor-fw-helper: NAT-PMP sendnewportmappingrequest returned 12 (SUCCESS)tor-fw-helper: NAT-PMP mapped public port 9090 to localport 9090 liftime 3600tor-fw-helper: Attempts to add ORPort mapping (natpmp) resulted in: 0tor-fw-helper: UPnP GetValidIGD returned: 1 (SUCCESS)tor-fw-helper: Attempts to add ORPort mapping (upnp) resulted in: 0

comment:2 Changed 9 years ago by ioerror

Resolution: implemented
Status: needs_reviewclosed

I've included the current output for two helpers currently supported by tor-fw-helper (all of this is on stdout because it lacks errors):

./tor-fw-helper -g
tor-fw-helper: UPnP GetValidIGD returned: 1 (SUCCESS)
tor-fw-helper: natpmp init...
tor-fw-helper: 2 NAT traversal helper(s) loaded
tor-fw-helper: ExternalIPAddress = 1.2.3.4
tor-fw-helper: tor_fw_fetch_public_ip backend miniupnp returned: 0
tor-fw-helper: NAT-PMP sendpublicaddressrequest returned 2 (SUCCESS)
tor-fw-helper: ExternalIPAddress = 1.2.3.4
tor-fw-helper: tor_fw_fetch_public_ip backend natpmp returned: 0
tor-fw-helper: SUCCESS

This is an example of a port mapping request:

./tor-fw-helper -i 20564
tor-fw-helper: UPnP GetValidIGD returned: 1 (SUCCESS)
tor-fw-helper: natpmp init...
tor-fw-helper: 2 NAT traversal helper(s) loaded
tor-fw-helper: tor_fw_add_or_port backend miniupnp returned: 0
tor-fw-helper: NAT-PMP mapped public port 20564 to localport 20564 liftime 3600
tor-fw-helper: tor_fw_add_or_port backend natpmp returned: 0
tor-fw-helper: SUCCESS

If this isn't OK, please re-open this bug and let me know.

comment:3 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:4 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.