Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

millar876

macrumors 6502a
Original poster
May 13, 2004
710
49
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
 
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.
 
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
 
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.

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
 
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
 
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

Careful, ipfw has been deprecated. it's being replaced by pf. IceFloor is a frontend for it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.