Make BitTorrent/P2P less annoying at home using Linux, Iptables, and QoS
Saturday, November 17th, 2007At home, I’ve been using a Linux router for as long as I can remember… since, a rather long time ago, I didn’t have money for a router but I happened to have an extra computer that I had been playing with Linux on it. So, I developed an ipchains script (which I eventually converted to iptables) to do NAT on it, and its worked pretty well ever since then. I honestly don’t remember where I derived the script from, however.
When I was in the dorms and afterwards in an apartment with others, we had used my Linux router, since it was pretty simple and theres a ton of things you can do with a Linux server. However, something we noticed (which wasn’t specific to this router) is that whenever someone was using BitTorrent or some other P2P app (you know, to download Linux distros and CC-licensed stuff), it would totally kill our internet access unless the person made their upload rate ridiculously low.. which is fine, unless a visitor stops by, plugs in, and forgets to turn their torrents down.
So, sometime last year I decided that there was probably a good way to filter different types of traffic so they don’t get excessive. Turns out, you can combine iptables and the QoS functionality of the kernel to do just that.