It's called iptables. You just need to set it up. It's quite robust, in fact we use it at work (I work for an ISP). Try
http://easyfwgen.morizot.net/ to make a custom configuration script. If you're feeling adventurous, try the wondershaper, too.
http://lartc.org/wondershaper/