Internet bandwidth limiter

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

  1. millar876 macrumors 6502a

    millar876

    Joined:
    May 13, 2004
    Location:
    Peterhead, Scotland UK
    #1
    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

    bankshot

    Joined:
    Jan 23, 2003
    Location:
    Southern California
    #2
    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 0.0.0.0/0


    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 192.168.1.0/24
    sudo ipfw add pipe 1 not dst-ip 192.168.1.0/24


    (I used 192.168.1.0 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

    Joined:
    Nov 1, 2006
    #3
    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

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #4
    Hi,
    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 ?

    Thanks,
    Tex
     
  5. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
  6. lukejmorrison macrumors newbie

    lukejmorrison

    Joined:
    Nov 15, 2009
    Location:
    Toronto
    #6
    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?

    Luke

     
  7. PBG4 Dude macrumors 68000

    PBG4 Dude

    Joined:
    Jul 6, 2007
    #7
    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

    Joined:
    Oct 5, 2010
    Location:
    Wales
    #8
    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.

    Thanks
     
  9. CarlSGutekunst macrumors newbie

    CarlSGutekunst

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

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

Share This Page