If you’ve ever needed to limit bandwidth on a certain port in OSX you’ll be happy to know that OSX comes with the ipfw firewall of FreeBSD fame.
Here’s how to use it to limit bandwidth on a port:
Create a pipe:
sudo ipfw pipe 1 config bw 50Kbit
Attach the pipe to port 80:
sudo ipfw add 1 pipe 1 src-port 80
To delete it:
sudo ipfw delete 1