I have partly wrote/partly stolen a little script that allows traffic shaping under Linux using iptables and tc. It can be configured to limit bandwidth based on port. I added it to my rc.inet1 script (and wrote a rc.shaping script) so it can easily be set up by added SHAPING="yes" to the rc.inet1.conf file for the interface.
My question is: does anybody else want to use this? I can post the script and detailed instructions if it'll help somebody out. Just reply here saying you'd like to see it, and I'll clean it up a bit (get rid of stuff that can't run anymore) and post it here.