blackbox Posted March 28, 2008 Report Share Posted March 28, 2008 Hi, it seems I found a bug with UPnP port forwarding in µTorrent.Latest stable version 1.7.7 opens TCP port with the entry name "uTorrent". It allows me to pass the port check at http://www.utorrent.com/testport.php?port=xxxxx and the icon in status bar turns green.Build 8192 didn't seem to forward the port properly, as the icon stayed red and online port check failed.Build 9137 creates port forwarding entry in my router, but only for UDP (entry name is "uTorrent (UDP)"). Online port check fails and the status bar icon is blank for some reason.If I go to the XP's "Internet Connection" properties and change the port forwarding entry type from UDP to TCP manually, it works.After updating to latest beta I tried deleting settings.dat, but it didn't help.Here is the UPnP log:[noparse][18:16:19] UPnP(XP): TCP port 17265 -> 192.168.1.33:17265 mapped successfully.[18:16:21] UPnP(XP): UDP port 17265 -> 192.168.1.33:17265 mapped successfully.[18:16:22] UPnP: Discovered host: http://192.168.1.1:80/DeviceDescription.xml[18:16:23] UPnP: Discovered new device: "ADSL Modem IGD" http://192.168.1.1:80/UD/?3[18:16:23] UPnP: Getting external IP[18:16:23] UPnP: Got external IP: 10.105.45.80[/noparse]As you can see, no port forwarding for TCP is done.I use XP SP2 (same results with Vista SP1) and my router is ADDON GWAR3500 (based on TrendChip). Link to comment Share on other sites More sharing options...
jewelisheaven Posted March 28, 2008 Report Share Posted March 28, 2008 As you see in the changelog, they made each mapping different for the protocols. I also presume you mean build 8912?Check with http://www.codeproject.com/KB/IP/PortForward.aspx to see if your router accepts the XP Firewall API for TCP. Link to comment Share on other sites More sharing options...
blackbox Posted March 28, 2008 Author Report Share Posted March 28, 2008 Yes, I meant build 8912 instead of 8192. If I understand changelog correctly, b9137 should create two port mappings - TCP and UDP. However, it creates only one for UDP.I didn't try the program you suggested, but all other UPnP-aware programs work well with my router. For example, eMule creates two port mappings - "eMule (UDP)" and "eMule (TCP)". Link to comment Share on other sites More sharing options...
DreadWingKnight Posted March 28, 2008 Report Share Posted March 28, 2008 Does wiresharking your traffic show two UPnP requests going out? (SSDP filter) Link to comment Share on other sites More sharing options...
blackbox Posted March 28, 2008 Author Report Share Posted March 28, 2008 Sorry, I'm new to Wireshark and can't seem to find how to filter SSDP requests. There is a text field "Filter" on the toolbar and corresponding dialog box, but neither of these list SSDP as a supported protocol. So I used NirSoft SmartSniff to see what's going on and there are indeed two AddPortMapping requests, both successful.However, if I open the "Internet connection" properties, there is only one UDP mapping visible.It's interesting to note that svchost.exe keeps two simultaneous connections to the router, and both port mapping requests use different connections. Maybe when the router receives a request before completing previous one, it "forgets" the first port mapping?Anyway, I'd like to stress again that even if this is a router bug, eMule is able to add two port mappings.I tried disabling XP's UPnP service to see if it makes any difference, and µTorrent created port mappings on its own. However with UPnP interface disabled I can't see the port mappings, because my router doesn't show them in the web interface. But online port check still fails, so I assume that TCP forwarding didn't take place.I also searched the forum and this thread looks very much like what I have. Link to comment Share on other sites More sharing options...
jewelisheaven Posted March 28, 2008 Report Share Posted March 28, 2008 ...except the change to 9137 was presumably for that thread.. making the requests have different names. If you could do the packet sniffing for both requests to both programs and paste it or upload it may yield more insight. If uT is making 2 requests the problem is with the router. Link to comment Share on other sites More sharing options...
blackbox Posted March 28, 2008 Author Report Share Posted March 28, 2008 I monitored eMule's activity and there's one obvious difference: it uses single Keep-Alive connection, instead of multiple connections like µTorrent. It also makes some additional requests:GET /WanDslLink.xml, GET /WanIpConn.xml and POST ... SOAPAction: "urn:schemas-upnp-org:service:WANIPConnection:1#GetStatusInfo" (I can post the full log if necessary).It all results in a significantly longer initialization, but all port mappings are done properly.I'm pretty sure that it's single connection that makes a difference. Link to comment Share on other sites More sharing options...
Firon Posted March 29, 2008 Report Share Posted March 29, 2008 Your router is just broken, really. It should have no trouble getting both mappings to work (ut is actually trying both, after all). Link to comment Share on other sites More sharing options...
blackbox Posted March 29, 2008 Author Report Share Posted March 29, 2008 Ok, I'm not arguing that the router has a bug. It probably does.But is it hard to implement a workaround for this, maybe via an advanced setting like net.upnp_single_connection? Link to comment Share on other sites More sharing options...
Greg Hazel Posted March 29, 2008 Report Share Posted March 29, 2008 Can you post wireshark logs of uTorrent 1.8 trying, uTorrent 1.7 trying, and eMule trying? Link to comment Share on other sites More sharing options...
blackbox Posted March 29, 2008 Author Report Share Posted March 29, 2008 Uploaded wireshark captures: http://www.mediafire.com/?zgzczmgvjzm Link to comment Share on other sites More sharing options...
Greg Hazel Posted March 29, 2008 Report Share Posted March 29, 2008 From the logs it looks like the mapping is working fine. Can you pick a different port in uTorrent, and see if the router creates both mappings properly? Link to comment Share on other sites More sharing options...
blackbox Posted March 29, 2008 Author Report Share Posted March 29, 2008 Tried many different ports, including "randomize port each start" option.I think that the router just overwrites the first port mapping if there are two simultaneous connections. Link to comment Share on other sites More sharing options...
Greg Hazel Posted March 29, 2008 Report Share Posted March 29, 2008 Tried many different ports, including "randomize port each start" option.I think that the router just overwrites the first port mapping if there are two simultaneous connections.The connections are not simultanious, however. They're sequential. Link to comment Share on other sites More sharing options...
blackbox Posted March 30, 2008 Author Report Share Posted March 30, 2008 Anyway, there must be some explanation why one program manages to set up port forwarding properly and the other doesn't I can do more packet sniffing or logging if necessary.Added 04.04.2008:Ok, I did more testing and it turns out that my router doesn't like when two port mappings (for TCP and UDP) are made on the same port. The second mapping succeeds, but overwrites the first one.As TCP mapping is followed by UDP, it gets overwritten and no TCP forwarding is taking place, leading to unconnectable state and low speeds.Because of that, I'm stuck with 1.7.7 as I can't get acceptable speeds with 1.8.0.Is it possible to implement a workaround for this router bug?I think there are at least two ways this could be done:[ul][li]change the order of mapping requests (first TCP, then UDP) - this will cause UDP mapping to be overwritten, but at least TCP will be connectable;[/li][li]disable UDP mapping altogether, reverting to 1.7.* behavior (via an advanced setting of course)[/li][/ul] Link to comment Share on other sites More sharing options...
slserpent Posted July 25, 2008 Report Share Posted July 25, 2008 i can confirm that this bug still hasn't been resolved as of 1.8 build 11564. i see a lot of entries in the changelog relating to trying to fix this, but you simply can't--some routers are just fucked up. as the OP said, there needs to be a option to only map TCP with UPNP. Link to comment Share on other sites More sharing options...
Firon Posted July 25, 2008 Report Share Posted July 25, 2008 Yeah, there's a bug alright, with the router. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.