Archive for August, 2009

How to throttle bandwidth on Mac OS X

Everyone living in a shared house will eventually run up against the problem of sharing broadband, especially if you’re downloading music, movies, games and system updates.   I live with my girlfriend and a couple of days ago she was working from home and I really needed to download some Audible books for a long journey I had the next day, unfortunately whenever I tried to do this it kept knocking her off of her company’s VPN connection.  Now, I’ve seen download managers and bittorrent clients with bandwidth restrictions but nothing that would throttle a web browser so I did a bit of Googling and found this helpful post.  Basically I’d worked out that at full pelt I was getting 135Kbps and this caused a problem with the VPN connection so I figured that maybe a third of that (45Kbps) would be a fair amount of bandwith to take, to do implement the bandwidth cap I had to…

  • Open up a session on OSX as the Administrator (I did this in parallel to my existing login).
  • Open up Terminal.
  • Type:
    sudo ipfw pipe 1 config bw 45KByte/s

    This sets up the rule limiting your bandwidth.

  • Type:
    sudo ipfw add 1 pipe 1 src-port 80

    This enables the rule.

Once you’ve finished the downloading you wanted to limit you’ll need to flip back into the administrator profile and do this…

  • Type:
    sudo ipfw delete 1

    This deletes the rule.

If you have any questions, feel free to leave a comment. Please note that this only restricts Port 80 which is the general web traffic port, if you had other activity going on (Skype, Bittorrent) then you’d need to add a rule for each relevant port.

Be the first to comment - What do you think?  Posted by Ash - 20090824 at 06:51

Categories: OSX, Popular   Tags: , , , , , , , ,