2006-02-17

Weird BitTorrent Behavior

One of the biggest rookie mistakes when using a BitTorrent client is failing to set bidirectional external connectivity for your machine. What this means is that you can create a connection to other people on the Internet and they can create a connection to you. There are a bevy of routers, firewalls, and NAT devices out there that just live to screw this kind of thing up and if you don't know how BitTorrent works or how your network is configured, you don't even notice something's wrong. Hey, you're still getting the file you want, right? How bad could it be?

In the past few days, I've noticed that I'm just not uploading like I used to on my active torrents. And by "like I used to", I mean "at all". Once I get a file, I'll finish uploading a few megabytes to some of my peers, but after a day or two of seeding, even on a relatively young and healthy swarm, I'll have zero peers.

Clearly, something must be wrong. I haven't fudged any of my firewall settings recently, and this is kind of behavior is indicative of that rookie mistake of not allowing remote connections your your BitTorrent client. So naturally, I check my Windows firewall and my /etc/pf.conf looking for things that are out of the ordinary.

I find that when I first start a torrent, I explode with a list of IP addresses and ports. First problem: a recent Microsoft Windows update has updated my C:\Windows\System32\Drivers\tcpip.sys file. I head to lvllord.de and download the patch again. Reboot. Now my tcpip.sys is fixed to allow 50 connections and I'm happy. Second problem: all the hosts are using non-standard ports. These are TCP ports outside the 6881 to 6889 range. Uh, OK. I suppose I could manually start putting these new, random port numbers into /etc/pf.conf, but I really don't want to. Isn't there anybody in this swarm who's using 6881 like a normal human being?

Not quite. But I see a couple 6883s, and a 6888. These are permitted by my firewall, so what's the problem? uTorrent is just flat out stalling on connecting to these addresses, as is Mainline 4.4.1. More to the point, Mainline lets remote connections through on 6881, so I at least know that my "rdr" lines in /etc/pf.conf are A-OK.

So I've got a BitTorrent client that only allows remote connections, and can't create local ones at all. This is the exact opposite of what most newbs do, and I'm not entirely sure when or why it's happened.

No comments: