The following code is a easy way to do Traffic shaping or Bandwidth throttling on OS/X. These are functions of the build-in firewall ipfw in OS/X.
With this rule you create a 24 KByte/s pipe:
sudo ipfw pipe 1 config bw 24KByte/sthen attach the pipe to a rule, ie all http (80) traffic:
sudo ipfw add 1 pipe 1 src-port 80After you are done delete the pipe to gain normal speed:
sudo ipfw delete 1
