Avoid Bandwidth Throttling on BitTorrent Traffic

Comments Off

For the past couple of days, I have noticed that the download rate for my BitTorrents would suddenly become really slow during the night. However, when doing a bandwidth test on DSLReports.com, everything was just fine. Being very suspicious I started to do some research on my issue, and I’ve found that my ISP has been identified as a bad ISP and started limiting torrent bandwidth during certain times of day, as known as traffic shaping or bandwidth throttling.

To avoid traffic shaping I found 2 solutions: encrypt my BitTorrent traffic or tunneling my BitTorrent traffic over SSH.

Encrypting BitTorrent Traffic

Encrypting the BitTorrent traffic is the easier solution to implement. There are 2 types of encryption Plain which obfuscates only the header of the stream, and RC4 which obfuscates the entire stream. RC4 is more CPU instensive, however it’s harder for the ISP to detect the BitTorrent traffic.

To enable encryption on Azureus:

  1. Go to Tools -> Options -> Connection -> Transport Encryption.
  2. Check the “Require encrypted transport” checkbox.
  3. Choose the encryption method “Plain” or “RC4″ to use in the “Minimum encryption level” dropdown.
  4. If the “Allow non-encrypted outgoing connections if encrypted connection attempt fails” checkbox is checked it will ensure compatibility with clients that are not using encryption, but makes it easier for your ISP to detect BitTorrent traffic.
  5. Check the “Allow non-encrypted incoming connections” checkbox.

Azureus Encryption

Note: For my ISP I found the optimum settings to use the “Plain” encryption setting with the “Allow non-encrypted outgoing connections if encrypted connection attempt fails” checked, and “Allow non-encrypted incoming connections” unchecked

To enable encryption on µTorrent

  1. Go to Options -> Preferences -> BitTorrent
  2. Under the “Protocol Encryption” section, in the “Outgoing:” dropdown , there are two options “Enabled” and “Forced”, where “Forced” will offer more protection against traffic shaping.
  3. Checking the “Allow legacy incoming connections” will improve compatibility between clients not using encryption but you will be more vulnerable to traffic shapping.

µTorrent Encryption

Note: For my ISP I found the optimum settings to use to enable outgoing encryption, and having “Allow non-encrypted incoming connections” checked.

Tunneling BitTorrent over SSH

SSH Server
First you need to get a SSH account from a shell provider. The shell provider needs to have a large amount of bandwidth and powerful processors to handle the load on the servers. A popular shell provider is http://silenceisdefeat.org, but I haven’t tried it out yet.

Installing/Configuring PuTTY
To open a SSH tunnel, you need to install PuTTY. Open the application after installation is completed.

  1. Expand “SSH” under “Connection”, and then go to “Tunnels”.
  2. Under “Add new forwarded port:” enter a port number beside “Source port” e.g. 7443
  3. Click on the “dynamic” radio button.

PuTTY screenshot 1

To improve traffic click on “SSH” under “Connection”, check the box “Enable Compression”

PuTTY screenshot 2

Click on “Session” and under the “Host Name (or IP address)” enter the public IP address or a fully qualified domain name of the SSH server PC. Enter a unique name in the “Saved Sessions” window and click on “Save”.

PuTTY screenshot 3

Click on “Open” and login to the SSH server with the appropriate user and password information, and leave the window open.

Configuring the BitTorrent Client (µTorrent)
The final step is to configure your BitTorrent client to go through a proxy server. For µTorrent Go to Options -> Preferences -> Connection and do the following under the “Proxy Server” section.

  1. In the “Type:” drop down menu select “Socks4″ or “Socks5″
  2. In the “Proxy:” text box enter “localhost”
  3. In the “Port:” text box enter the port which you previously defined in the Putty client e.g. 7443

µTorrent Proxy

Since configuring Azuerus will be similar, I will not provide the instructions here.
After you are done, restart your BitTorrent client.

Doing a Quick Test

To verify the solutions work, I did a quick test. I begun downloading a healthy torrent file at a rate of 150kb/s. When the peak hour arrived, the traffic shaping started and my rate immediately dropped to 25kb/s. I begun implementing the encryption method with Azureus and µTorrent, I was able to get my rate back up to 100kb/s and 70kb/s respectively. When implementing the SSH tunneling solution I used my friend’s SSH server which was not on the same network as my ISP. Unfortunately, because of bandwidth limitation from his server, I was only able to reach 45kb/s.

In conclusion, I am now using µTorrent as my BitTorrent client with encryption enable to download my BitTorrents.

Setting up BitTorrent

Comments Off

BitTorrent (BT) is a peer-to-peer (P2P) communications protocol for file sharing.

Installing a BitTorrent Client

The client that I prefer is the Java-based Azureus, which can be download for free. Some people have say that they couldn’t get this client to download as fast as other clients but for me, I have been able to download at the max of the download bandwidth if given the opportunity. However, the main reason I chose this client is because since it written in Java and must be run inside a JVM, I personally feel that it’s more secure than other Windows-based clients.

Java

Since Azureus is Java-based, then it requires to have Java installed to run to it. You need at least version 1.5 otherwise older version may cause problems. Java can be downloaded at http://www.java.com, and needs to be install first before you install Azureus.

Setting Up

Choosing a Port

If you haven’t already then you’ll need to choose a port for Azureus to listen on. If you chose port 6881 (the default port), then this needs to be changed because some torrent trackers have blacklisted this port.

  1. In Azureus go to Tools > NAT / Firewall Test
  2. Enter a port number between 49152 and 65534 in the box beside “Incoming TCP Listen Port”
  3. Click on the “Test” button

If the test returns:

"Testing port XXXXX ... OK !"

Then you are ready to start downloading. Otherwise if the test returns:

"Testing port XXXXX ... NAT Error"

Then there is a small problem where the listening port is closed and Azureus can’t accept any incoming connections. This will affect your downloading because you are limited to the number of peers you can connect to. Not to worry this a very common problem for most people who have a router or firewall installed. All you need to do is enable port forwarding for your router, or opening the port up for your firewall.

Note: To double check if your port is open you can also use the website Shields UP!

Port Forwarding for Routers

To handle port forwarding your computer needs to be assigned a static local IP address. After you have configured this tell your router to forward the port you selected earlier for both TCP and UDP protocol.

Opening Ports for Firewall

If you have a firewall it might be rejecting connections, even when they reach your computer. If this is the case, you will need to change your firewall settings to either allow the process Azureus.exe complete access to the internet, or allow the port you selected earlier.

Optimizing Connection

The upload limit will affect your connectivity the most. The rule of thumb is to set the limt to 80% of your upload capacity. Here are some sites which you can check your bandwidth on:

If you want to do more optimizing you can use the Azureus upload settings calculator.

Losing internet connectivity after a while

BitTorrent is very network intensive to your router and network card because it needs to manage many connections. I have a Linksys router which is known to have problems with too many global connection. To fix the problem you can limit the max global connections to 200 or less under Tools > Options > Transfer > Max connections globally

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in