Demystifying BitTorrent Port Settings

29 01 2006

Everyone in the peer-to-peer file sharing community is talking about “BitTorrent”. It seems that this technology is the favourite among file sharers these days, but setting it up to work correctly can be a challenge. Unlike many other click-and-go P2P clients like the infamous KaZaa or the now legitimised Napster, BitTorrent takes some getting used to. Perhaps the most difficult part of BitTorrent configuration to understand, is just what you need to do with those bloody ports! Forums such as Whirlpool are flooded with threads asking “why are my torrents so slow?” and equally-many would-be-gurus giving contradictory advice. In this article, I will aim to demystify the issue of ports in BitTorrent, without getting bogged down in details.


Unless you are connecting directly to the internet with no routers or firewalls in the way, you will almost certainly need to adjust your port settings to get torrents to download properly. There are two connections your torrent client needs to make in order to do its job:

  • Firstly, it announces itself to the “tracker”. This is a server that, as the name suggests, tracks all the seeds and peers currently sharing your torrent.
  • Secondly, it begins sharing (both download and uploading) data with other users.

To complete the first job, the torrent client must be able to send data OUT on a port of the tracker’s choosing. Often this isn’t a problem, so this step is the one commonly forgotten in discussions of torrents and port settings. The reason this often isn’t a problem is that many firewalls allow unconditional outbound access. If, however, your router/firewall only allows outbound connections on specific ports, you will often get problems connecting to trackers. To make things more complicated, because some trackers use common ports for other protocols (such as the HTTP port 80), the problem will seem intermittent and therefore not readily apparent.

You will need to do a little detective work to determine which ports need opening. When downloading a .torrent file, have a look at the actual tracker URLs. What you will see will be a list that looks something like:

http://tt.ngb.pl:80/announce.php
http://www.bittorrent-trker.com:6969/announce.php
http://205.52.189.202:80/announce.php
http://tracker.prq.to:7000/announce

The port numbers sit after the host name and a colon, and appear in bold above. Generally you don’t need to open all of the ports in the list, as you only need to connect to one of the trackers. As mentioned above, some trackers use standard port numbers like 80, which will already be open. 6969 was the original default tracker port, but has been increasingly blocked by some draconian ISPs. Other common ones are 2710, 3389 and 7000. Ultimately, the ports you need to open will depend on which trackers you use. Remember, you ONLY need OUTBOUND access to these ports. Never allow inbound unless you have no choice.

Speaking of inbound access brings us to the second item on our list - the actual sharing of data. With all new download clients (uTorrent, Azureus, etc), only one port is used for all torrents. The actual port number can be any of your choosing, and for the sake of security it’s best to be as imaginative as possible here - although don’t be fooled, opening ANY port to inbound access is a security risk. Technically torrents will still work with outbound access only, but the connection speed will be severely reduced (within the realm of dial-up speed).

For those using software firewalls and a direct connection to the net, this will be all you need to do. If you are connecting via a router however, one more step needs to be done. Once you open your router’s port for inbound access, the router needs to know what to do with whatever comes through that port. This is achieved using a method known as “port forwarding”, a term commonly seen in torrent tutorials. It’s generally not as scary as it sounds. All you need to do is specify the port number to be forwarded and the local IP address of the computer to forward to. Most routers’ configuration screens will have a section for Port Forwarding somewhere in the vicinity of the Firewall settings.

The actual configuration procedures for individual firewalls and routers are well beyond the scope of this brief article. For help in this regard, refer to your software’s or hardware’s instruction manual.

To summarise:

  • You need OUTBOUND access on a variety of ports, dictated by the trackers you use
  • You need OUTBOUND and INBOUND access on one port of your choosing, which you must also configure in your torrent client program
  • If you use a router to access the internet, you will need to FORWARD the inbound port to your computer’s local IP address.

Actions

Informations

One response to “Demystifying BitTorrent Port Settings”

18 09 2008
drax (20:09:01) :

is it necessery to know the brand and the model number of the router to port forwading?????………..help..

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>