Opened 11 years ago

Closed 11 years ago

#4006 closed Bug (worksforme)

UPnP doesn't map TCP port

Reported by: garrych Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.20
Severity: Critical Keywords:
Cc:

Description

Router Zyxel P-660RT, UPnP active for firewall configuration. Transmission logs:

2011-02-09 23:15:58 +0300 upnp.c:113 [Info] Port Forwarding (UPnP): Found Internet Gateway Device "http://192.168.1.1:80/UD/?3"
2011-02-09 23:15:58 +0300 upnp.c:115 [Info] Port Forwarding (UPnP): Local Address is "192.168.1.101"
2011-02-09 23:15:58 +0300 upnp.c:221 [Info] Port Forwarding (UPnP): Port forwarding through "http://192.168.1.1:80/UD/?3", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 192.168.1.101:16881)
2011-02-09 23:15:58 +0300 upnp.c:224 [Info] Port Forwarding (UPnP): Port forwarding successful!
2011-02-09 23:15:58 +0300 port-forwarding.c:95 [Info] Port Forwarding: State changed from "Not forwarded" to "Forwarded"

Router nat table right after:

14 Transmission at 16881   16881 - 16881    192.168.1.101   0
     YES      UDP           16881 - 16881          0.0.0.0 - 0.0.0.0

Just UDP port

Change History (12)

comment:1 follow-up: Changed 11 years ago by livings124

Is this repeatable? What happens in previous versions? This might be a local issue, or if not an upstream issue (UPnP is handled by miniupnp).

comment:2 in reply to: ↑ 1 Changed 11 years ago by garrych

Replying to livings124:

Is this repeatable? What happens in previous versions? This might be a local issue, or if not an upstream issue (UPnP is handled by miniupnp).

Previous version mapped TCP port. Version 2.20 (according to release notes) maps ALSO UDP. For me it's just UDP.

comment:3 Changed 11 years ago by garrych

As I see in upnp.c.

1st step - map tcp port (no error in log)
2nd step - map udp port (no error in log)

Maybe seconf one is replacing tcp mapping rule?
From Zyxel P-660RT1 CLI command reference:

ip nat server edit [rule#] protocol <TCP|UDP|ALL>

Configure the protocol to be used TCP , UDP or ALL (it must
be capital)

Is it possible to map both protocols with one code block?

Last edited 11 years ago by garrych (previous) (diff)

comment:4 Changed 11 years ago by garrych

According to WANPPPConnection:1 Service Template Version 1.01:

2.2.25.PortMappingProtocol
This variable represents the protocol of the port mapping. Possible values are TCP or UDP.

So for my case it's important to announce protocol mapped last.

Last edited 11 years ago by garrych (previous) (diff)

comment:5 follow-up: Changed 11 years ago by jordan

This sounds like it might have been caused by r11680 for #2191. garrych, iirc you've builds in the past. If that's right, could you try rebuilding after reverting r11680 locally and see if that solves the problem?

comment:6 in reply to: ↑ 5 Changed 11 years ago by garrych

Replying to jordan:

This sounds like it might have been caused by r11680 for #2191. garrych, iirc you've builds in the past. If that's right, could you try rebuilding after reverting r11680 locally and see if that solves the problem?

Build it from trunk and upnp.c of revision 11599. Well, it works as good as 2.13. NAT Rules table shows:

14 Transmission at 16881   16881 - 16881    192.168.1.101   0
    YES      TCP           16881 - 16881          0.0.0.0 - 0.0.0.0        

TCP port. It's open and preferences' check confirms it. Can anybody test if serial port mapping of TCP and then UDP opens both protocols? Or it's my local issue with Zyxel P-660RT1 router?

comment:8 Changed 11 years ago by garrych

  • Severity changed from Normal to Critical

comment:9 Changed 11 years ago by jordan

I've sent mail to starix asking if he wants to field this, since he wrote the patch and may have some better ideas on the Right way to fix this. If he's not available, I'll take a look.

comment:10 Changed 11 years ago by starix

Workaround is to manualy set port forwarding...

comment:11 follow-up: Changed 11 years ago by starix

Code from upnpredirect.h

/* upnp_redirect() 
 * calls OS/fw dependant implementation of the redirection.
 * protocol should be the string "TCP" or "UDP"
 * returns: 0 on success
 *          -1 failed to redirect
 *          -2 already redirected
 *          -3 permission check failed
 */ 

so values to input are TCP & UDP only. And my routres ASUS ASUS WL-500gP V2 and TP-LINK TL-WR1043ND works flawlessly. Both TCP & UDP with 2.21 version. So it seems, that problem in your router :(

comment:12 in reply to: ↑ 11 Changed 11 years ago by garrych

  • Resolution set to worksforme
  • Status changed from new to closed

Replying to starix:

Code from upnpredirect.h

/* upnp_redirect() 
 * calls OS/fw dependant implementation of the redirection.
 * protocol should be the string "TCP" or "UDP"
 * returns: 0 on success
 *          -1 failed to redirect
 *          -2 already redirected
 *          -3 permission check failed
 */ 

so values to input are TCP & UDP only. And my routres ASUS ASUS WL-500gP V2 and TP-LINK TL-WR1043ND works flawlessly. Both TCP & UDP with 2.21 version. So it seems, that problem in your router :(

OK, got it. Thanks for the info. This is time to upgrade, I think.

Note: See TracTickets for help on using tickets.