Optiomizing Bittorrent by dropping resets

I just switched a celeron-M based OpenBSD gateway to a routerboard 150 and have seen bittorrent speeds drop (the upstream is limiting missionary-style bittorrent traffic). From what I can gather, some folks are speeding things up by dropping all reset traffic with something like this:

ptables -F INPUT -p tcp --dport bittorrent-port-range --tcp-flags RST RST -j DROP

Can this be accomplished with RouterOS? I was also using some of OpenBSD’s stochastic optimization for TCP sequence number to improve throughput (and it worked well). I know I can’t expect the same behavior from RouterOS, but it would be nice if I was able to get numbers that weren’t 10% of what I was seeing with OpenBSD. I know this is sort of the opposite of what people are usually doing with RouterOS (deliberately limiting bittorrent to conserve wireless bandwidth, but the RB150 is an all wired ethernet router… I would like to go in the other direction).

Any ideas?

It’s certainly possible to drop TCP packets that have the RST flag set, using the RouterOS firewall, so you should be able to do what you’re asking with a single rule.

Using WinBox and adding a rule to the input firewall table:

Specify an input interface of your (Comcast Cable Modem? :slight_smile:, protocol TCP, port range you’re interested in and on the Advanced Tab/TCP Flags, select the RST flag. That should match the RST’s you’re looking for, and you’ll see the packet count increase if you’ve gotten the rule right. Then you simply switch the action from “Accept” to “Drop”. :slight_smile: