The battle rages on between copyright holders, internet service providers, governments, and end users over Bittorrent. Often used as a tool of illegal piracy, the torrent community often strikes back as saying it is a tool for good as well, decentralizing downloads and making large transfers of files highly efficient. Some games patch themselves using a bit torrent system to save on bandwidth costs. Some game mods are available on pirate websites for free. Freeware and shareware are delivered over Bittorrent, and torrents are used as a cheap resource for the Linux community to distribute custom distributions of the operating system.
On the other hand, we all know that torrents are often used to pirate software, music, and movies. Copyright holders want every dollar they can squeeze out of their media, even if it means lobbying congress to make ripping movies to your iPod illegal. Internet Service Providers hate torrents. They hog bandwidth, run up costs, and congest networks with traffic. In some cases the ISP and the copyright body are the same group (i'm looking at you, Time Warner).
Today we are going to talk about the battle that is raging in the switches and routers around the world. Traffic shaping, specifically torrent traffic shaping.
What is traffic shaping?
Traffic shaping is a term used in networking for managing the priority and speeds with which various data can pass through a network. A good example of traffic shaping is QoS (Quality of Service) networking. In a lot of commercial networks, voice data for phones is given priority over data traffic to prevent lag or noise in a live phone conversation. The traffic shaping we are talking about today is often not taking place to maintain service. It is to reduce Internet Providers bandwidth bills, and to slow or thwart piracy activities. People using legal torrents are caught in the middle of this battle, and are seen by Internet Providers as collateral damage.
How is traffic shaping deployed?
There are multiple methods of shaping your traffic to block or hinder torrents. The most common one is to block or throttle (slow down) the traffic coming through the default port that Bittorrent apps use. By either blocking or throttling ports 6881-6889, they effectively hinder or even stop Bittorrents. A more sophisticated method looks at the headers of each packet and inspects them Bittorrent like characteristics as it passes through the network, and then throttles the packets if it finds them to have Bittorrent like properties. Some networks block or drop any connection that has a large number of inbound and outbound streams moving data from a single address, another typical thing that Bittorrent does that can be profiled by an ISP and throttled.
The most complex new system is called Sandvine. This is actually the name of a networking company, but they have coined a new feature in some of their products that directly targets Bittorrent activity. When a Sandvine device detects torrents it sends a "disconnect" message both peers, dropping the connection. Comcast has deployed Sandvine within their networks and other ISPs are following suit.
How do users fight back against traffic shaping?
DISCLAIMER: DO NOT USE THIS GUIDE TO DO ILLEGAL FILE SHARING. ONLY USE THIS GUIDE IF YOU ARE DISTRIBUTING LEGAL TORRENTS.
I'm going to give examples from the Vuze client, because it is based on Java and will work on almost any device with a decent internet connection.
Port Blocking: Go to the Tools menu. Open up Options. Enable the Advanced menu if you haven't already, so you can see all of the hidden options. Click on the "connection" item in the menu. Check "randomize listen port numbers on startup" and uncheck "same port for TCP and UDP". This will make it so your network cannot block Bittorrent based on the port it is using.
Packet Header Inspection: Go to the Tools menu. Option up Options. Enable the Advanced menu if you haven't already. Double click on the connection menu to open up the submenu, click on "Transport Encryption". In the menu that opens up, check "require encrypted transport" and make sure "RC4" is selected from the drop down menu. RC4 is a stream cipher, and will encrypt the entire packet including the parts of the packet headers so that equipment cannot inspect the content of the files to determine if they are torrents or not. You will also want to go the transfer menu and enable "lazy bitfield". This changes the way that the torrent headers behave and can help fight packet header inspection.
Connection-Count Blocking: This one is more complex because it varies by ISP. The typical profile of this kind of blocking is that once your connection is concurrently connected to too many addresses at one time, the ISP cuts off the connection for a few seconds, causing all of the connections to time out and the process to start over. To combat this kind of blocking, you'll want to limit the total number of connections globally. In Vuze, you'll want to go to the transfer menu, and limit the number of "Max connections globally". This one will have to be dialed in based on your ISP, keep reducing the number until you can see that your connection stops spontaneously dying while downloading or uploading torrents.
Sandvine Devices: Here is a discussion on a possible fix if you want to combat Sandvine.