13 October 2011

Using a private torrent to transfer large files over unreliable WAN links

Torrent files are almost always associated with pirated file transfer, but the technology is actually rather remarkable.  Torrent are extremely robust and handle disconnects and reconnects and slow connection really well. If you are, for instance, attempting to transfer a 1GB file into deep dark Africa over slow unreliable links this is a good option to use.

Required Software
My preferred torrent client has always been ĀµTorrent (meaning Micro Torrent) or as it more commonly referred to uTorrent.  It support everything you want it to do, including a web interface for managing your torrents.  Bandwidth throttling, schedules and thresholds.  Most importantly for this article, it has it own internal ability to be a torrent tracker.  This remove the requirement to have a public web tracker.

Download this great free tool from http://www.utorrent.com/

Configure uTtorrent as a tracker

Configure incoming listening port

From the file menu
  • Options
  • Preferences
  • Connection
  • Make a note of the port number that you specify. 
  • As a suggestion use port 443 as this would enable access through most firewalls
  • DO NOT check Randomize port for each start (you will see later why not)
  • Restart uTorrent (Also exit from the system tray icon)




Enable the Tracking ability
From the file menu
  • Options
  • Preferences
  • Select Advance
  • find bt.enable_tracker
  • Change the value from False to True
  • You now need to restart uTorrent - exit it from the system tray to ensure it closes completely




Additional Optional Settings
One of the best things about uTorrent and most other torrent clients is the ability to set limits.  Check out the options under Bandwidth, Transfer Cap, Queuing and Scheduler.

Establish what your external IP address is
You will need to know your external internet IP address to host or track the torrent file.  The quick and easy way is to visit http://whatismyip.org or http://whatismyip.com.  If you have a fixed external IP this is all you will need.

Most ADSL accounts however have a dynamic IP assigned by the ISP at each reconnect.  To work around this problem you can have a dynamic DNS entry registered by DynDNS.  The provide a free service that I have used in the past and have been very impressed by.  Check it out at http://dyn.com/dns/dyndns-free/

Creating a torrent file
From the file menu
  • Create new torrent
  • Add your source directory or file
  • Under trackers - delete the defaults - add your details you collected earlier in the format http://your_ip_address:your_listening_port/announce
  • Check Start seeding to make it available right away
  • Check Private torrent to make it private
  • Create and save as..
This will now produce the "very small" torrent file


Distribute and download the torrent
The torrent file created in the step above can now be distributed in any number of ways including emailing it.

You need to have uTorrent install on the client side with the relevant firewall access allowed.
  • Open the torrent file
  • Specify where to save it 
  • Check the Start Torrent Box
  • OK
The torrent should now be downloading.  once complete it should switch status from Downloading to Seeding.

At this point you can even stop seeing from the original tracking host and all subsequent download will be from peer machines that are seeding.  The more peers you have the greater the availability will be and therefore the more robust it would be against any single peer becoming unavailable, this could be because of any number of reasons, including scheduled or transfer caps.

Troubleshooting
If you create the torrent and seeding it should start downloading and seeding it right away.  If it does not there is a problem.

  • You must set the incoming port before you enable bt.enable_tracker.  If you need to change the listening port, set it back to false.  Change the listening port then re-enable it.  Restarting after each step.
  • If there is a problem with the listening port you will see a red warning in the bottom right corner of the main screen.
  • The file needs to be seeded from a location with correct NTFS security try adding the file from the c:\ drive as a test.
  • Check firewall access on both the seeing and downloading machines to ensure ports are open.

Conclusion
Torrents might be considered "the naughty file type", but it can be used to overcome certain transfer problems.  It is simple, free and robust.  Since torrent clients are available for almost any OS this is also a great way to transfer between disparate OS types.

And now there is one more legitimate torrent file, other than downloading yet another Linux distribution...



More on using torrents
http://fixmyitsystem.com/2011/10/building-corporate-torrent-tracker.html
http://fixmyitsystem.com/2011/10/using-private-torrent-to-transfer-large.html
http://fixmyitsystem.com/2011/11/run-any-executable-as-service.html

1 comment:

David Warner said...
This comment has been removed by a blog administrator.

Post a Comment