Jump to content

Once and for all, exactly what ports does utorrent require to be open?


Recommended Posts

Once utorrent is started there are a plethora of attempted connections to IANA ip addresses. Is this part of the design of utorrent or is it just insecure?


Utorrent sends out thousands of dns requests non-stop. I've opened up the port that I have setup in utorrent. But there are attempts to connect via any port >=1024.

Link to comment
Share on other sites

Once utorrent is started there are a plethora of attempted connections to IANA ip addresses. Is this part of the design of utorrent or is it just insecure?

Looks like someone has never heard of multicast.

These IANA ranges are assigned to multicast services. uTorrent uses them for local peer discovery.

Outbound rules: from any to any

Inbound rules: from any to local listen port.

Link to comment
Share on other sites

That's a prerequisite of utorrent functionality? Local peer discovery and dynamic outbound ports? As a prerequisite of installation, I disabled the Local peer discovery for its vulnerabilities both within the utorrent application and all across Windows from upnp to link layer topology discovery. I've also disabled upnp, nat-pmp port mapping within the application as well as randomize each port. The outbound rules you suggest are a little too intense for my specific security needs. Is there any way to setup utorrent so that it communicates via one port and so that it doesn't send thousands of dns requests per hour?




According to the manual here:





Perhaps I could put a range of ports into bt.no_connect_to_services_list

And add an ipfilter.dat with the undesired ranges of IANA IP's


The manual doesn't specifiy whether ranges can be used or how to do so




I set net.outgoing_port and net.outgoing_max_port to my desired port according to the manual. I didn't know a manual existed I'm glad I thought of it. Hopefully it works.




To get rid of the insecure connections to IANA IP addresses make sure that under Options -> Preferences -> Advanced


To give you an example of how to configure the ipfilter.dat file google for "utorrent" "ipfilter.dat" or if this site is still active download from




Extract the file using 7-zip or another archiver into your installation directory. Use it as is or you can edit it or create your own with only the specific network that you do not want in your network. If you're on Windows 7, currently the installation directory is C:\Users\<username>\AppData\Roaming\uTorrent


If the iblocklist site is down this is how to format the ipfilter.dat file, to block the network you would type - , 000 , Bogon

I'm fairly certain it doesn't need to be called Bogon but I kept it that way. You could also do this in your desired firewall but I personally don't want my firewall being taxed by utorrent if it doesn't need to be. Though I have the rules there anyway, especially if there is an upgrade and the "feature" is removed.


To get rid of the outgoing connections to any and every port you can set


In the advanced preferences mentioned above.


As far as the dns requests are concerned, disabling "Resolve IP's" in utorrent's peer tab does not work for me. I suspect it may have something to do with the way I setup my network. Perhaps I'm not allowing Windows to cache known DNS queries so that it can remember them instead of constantly asking for every address every time the address is accessed. I set the DNS Client to disabled under


Start Menu -> Run -> services.msc


because DNS Client is/was vulnerable to DNS cache poisoning




I'm not confident that they fixed it in Windows 7, I'm still currently hardening my Windows installation so I don't have enough information to explain how to harden the DNS Client, I believe though DNSSEC and/or IPSEC may be the answer. For the moment, I've very reluctantly turned it on. I've seen a slow down in DNS queries but there are still thousands of queries.


If security is your concern, you should disable and/or harden the above features. If speed is your concern, disabling the features above may slow down your connection. How much I'm uncertain, but at first glance it appears to be miniscule.


As far as hardening is concerned,





For Windows:









For Linux:








I don't yet have enough PC's to use a DMZ. I personally currently use a combination of two PC's because Windows isn't, as far as I can tell, very good for security. Linux isn't very good for games and many of the software on the market is only on Windows. I don't like the idea of using Wine. I don't like dual booting. And I personally didn't have good results when using the bare metal virtualization approach through open source software Xen.




I tried that approach for a while and decided I wanted the best of both worlds. This approach is still in alpha as I'm in the process of building and testing it. For the linux PC, I use Gentoo for its flexibility and its many security options, Selinux, App Armor, Tomoyo, SMAC (Simplified Mandatory Access Control), Grsecurity (which can be used in combination with one (or more?) of the others. For a production network I would go with CentOS because its free or Red Hat Enterprise Linux.


Or use one of the firewall distros like pfSense




The linux PC acts as a router/gateway for the Windows PC. I had and still have a lot of headaches with Selinux because I use the strict policy. The targeted policy seems too loose, though it can be configured to be as strong as the strict policy.


The only tools I have found useful so far for selinux is audit2allow, system-config-selinux, permissive domains


permissive domain control is available in the system-config-selinux gui.





and disabling dontaudit for "silent denials"

semodule -DB [temporarily disable]semanage dontaudit off [permanently disable]

There are other tools available



sepolgen or "sepolicy generate" or sepolicy-generate




sepolicy generate makes creating policy easier than using audit2allow but I haven't gotten it to work. Run the system in permissive mode for a while open/close programs, boot/reboot, etc then use audit2allow to get rid of the denials.






It's probably a good idea to scrutinize the guides "and the software" carefully for any holes intended or unintended.





Well utorrent has been great, I don't know why I haven't thought of this before as I've been moving all of my software to open source for security and because I'm an aspiring programmer.




I found qBittorrent to be the best application for my needs. I've used it before on linux. Though I seriously hate the way qBittorrent's gui looks. It looks like cheap minimalistic typical linux lameware as far as GUI's are concerned. I was looking at Deluge but its mostly written in python and some C++. Which is OK but I prefer C/C++. Bitcomet was my application before utorrent but the gui kept freezing and its not open source. I had this subconscious feeling utorrent was open source "in the past" but after doing some research I think it was Bittorrent that was open source and they purchased utorrent or something and turned their application into closed source. I still like utorrent for its flexibility, you can even turn off the ads, but its not open source. The rest of the applications in the wiki don't support one thing or another like Socks/Socks4/5, and other security features.

Link to comment
Share on other sites


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

  • Create New...