Jump to content

Randomize port problem


nikhilj1

Recommended Posts

I have a upnp enabled modem and i have selected randomize port on each µtorrent start. But whenever a fresh copy of µtorrent is launched it starts with port 1026 and doesn't even tries to map the port.

When i manually click on randomize port then it changes port and successfully maps the port using upnp.

Any solution

--NJ

Link to comment
Share on other sites

Currently, when setting utorrent to start on windows bootup, and using random port, utorrent will always open up the same port (in my case 1025). When restarting utorrent, or pressing the random port button, utorrent will then proceed to pick a random port. But this is still a problem as there are i bet many users out there like me who would like a random port and who set utorrent to start on windows bootup and DONT normally switch utorrent off till they shutdown their PC. Ergo im gonna be using port 1025 most of the time, despite having randomise port enabled. Ergo bug :P

Link to comment
Share on other sites

1025 is fine alus, as long as i dont see it again for the next several hundred reboots. I just suggest setting utorrent to ignore the first port the OS assigns it when setting utorrent to start on windows bootup. As subsequent utorrent reboots after windows has started do get "random" ports.

Link to comment
Share on other sites

Then we have a problem then, unless u can come up with some other way of randomising the port windows gives us.

EDIT: Now we have an even bigger problem than i originally thought. I have four machines on my network, of which two have utorrent to start up on windows startup, and both have randomise port ticked. So I bet you can guess what is going to happen. Both of them are assigned port 1025, and one of them wont port forward. So much for windows giving it a port that is guaranteed to be used by something else. :P

So as far as i can see you have two problems to sort out.

The first is to find a way of getting utorrent to truly have a random unused port on startup with windows.

The second is to change utorrents behaviour, so that if utorrent cant port forward on the port it is assigned, then it informs the user in the logger that it is going to attempt to TEMPORARILY port forward on that port+1, or some other value, a random value maybe. This new port value isnt saved permanently, the value the user picked is still the value in the textbox in preferences, and the next time utorrent tries to remap a port/next time utorrent starts it will attempt to port forward on the user selected port. If it fails again, then it can go back to temporarily picking its own port.

Link to comment
Share on other sites

Well, Windows gives you an unused port on that machine, not on your router. UPnP does specify that a router should do the same thing - give you an unused external port to map to your internal port. So the bug here if the second machine on port 1025 fails to map with UPnP is that your router did not implement UPnP properly.

Picking a random port in uTorrent will help mask that bug, but there's still the chance that it would choose a port that another machine or mapping has.

Picking a temporary port leads to a bunch of internal complications, not the least of which is which port to report in the Preferences (and how to discover the other port).

Perhaps an option to randomize the port on mapping fail (max 3 times or something) would be sufficient, and/or additional logic to the "randomize on startup" to pick a port in a fashion which is unlikely to have collisions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...