Internet bandwidth limiter

Discussion in 'macOS' started by millar876, Jul 24, 2007.

  1. millar876 macrumors 6502a


    May 13, 2004
    Kilmarnock, Scotland UK
    At the moment i'm sharing a house while waiting for some prety serious repair work to be done on mine. therefor im sharing an ADSL line, but its only 568Kbps (ish) and i dont want to use more than my fair share of the somewhat limited bandwidth. Dose anyone know of an app that i can use on my iMac to set a maximum upload and download speed for my connection.

    ADSL line -to- BT Voyager Wifi router -to- 1x LAN XP pc and 1x Wifi Vista PC and 1x imac in sig

    the last being my own
  2. bankshot macrumors 65816


    Jan 23, 2003
    Southern California
    If you don't mind getting your hands a little dirty, you can do this from the command line (open Terminal in Applications/Utilities). The simplest form would be this:

    sudo ipfw pipe 1 config bw 300kbit/s
    sudo ipfw add pipe 1 dst-ip

    Enter your own password when prompted. Change the "300" to whatever number you want (for real fun, simulate a modem by changing it to about 30 or 40 kbit/s :D).

    This limits ALL traffic, including that to the local network (maybe you share files with other computers, and you don't want that to be slow). If you want to only limit internet traffic, there are a couple of options. One is to change the above rules to only apply to specific network ports - like web, mail, etc. To limit just those, do this instead:

    sudo ipfw pipe 1 config bw 300kbit/s
    sudo ipfw add pipe 1 dst-port http
    sudo ipfw add pipe 1 dst-port https
    sudo ipfw add pipe 1 dst-port pop3
    sudo ipfw add pipe 1 dst-port pop3s
    sudo ipfw add pipe 1 dst-port imap
    sudo ipfw add pipe 1 dst-port imaps

    Another option is to only limit traffic not going to or from the local network. If you know your network address (usually your internal IP with a 0 in the last place), you'd do something like this:

    sudo ipfw pipe 1 config bw 300kbit/s
    sudo ipfw add pipe 1 not src-ip
    sudo ipfw add pipe 1 not dst-ip

    (I used as the network address; change it to yours).

    Finally, the all important command: when you want to get rid of the bandwidth limiting, use this:

    sudo ipfw flush

    Also, rebooting will clear it - these settings don't stick between reboots.

    More info is here (it explains how to use queues to limit upload and download separately) or use this Google search.

    Hope this helps.
  3. Blubbert macrumors 6502

    Nov 1, 2006
    If you would like a graphical front end to all this i reccomend WaterRoof, or its more simple cousin DummyMac.
  4. Tex-Twil macrumors 68020


    May 28, 2008
    I have the same question. What is the rule to set if I want to limit the upload bandwidth to any protocols to a given value ?

  5. Tex-Twil macrumors 68020


    May 28, 2008
  6. lukejmorrison macrumors newbie


    Nov 15, 2009
    Scheduling Bandwidth Quota's

    Is there a tool that will allow me to set a total upload/download bandwidth quota so I don't get charged by my ISP for extra bandwidth?


  7. PBG4 Dude macrumors 68030

    PBG4 Dude

    Jul 6, 2007
    Thanks for your post! :D I needed to throttle my MBP while my son watched some Netflix and this information was exactly what I needed! :D
  8. amityweb macrumors member

    Oct 5, 2010
    I know this is an old thread but fantastic bankshot, thanks a lot, this works on Mountain Lion. I am transferring GBs of emails from one Gmail to another which was killing my internet in work. This works on my Macbook allowing it to keep transferring slowly whilst not interrupting the rest of us in the office.

  9. CarlSGutekunst macrumors newbie


    Sep 18, 2012
    Northern California
    Ditto -- an incredibly timely, useful, and completely unexpected post.
  10. JayArby macrumors newbie

    Jan 13, 2013
    Careful, ipfw has been deprecated. it's being replaced by pf. IceFloor is a frontend for it.

Share This Page

9 July 24, 2007