Site menu Simple bandwidth limiter for OSX
e-mail icon
Site menu

Simple bandwidth limiter for OSX

e-mail icon


This article expresses the author's opinion at the time of writing. There are no guarantees of correctness, originality or current relevance. Copying the whole article is forbidden. Transcription of selected parts is allowed provided that author and this source are mentioned.

UPDATE: if Internet Sharing is enabled, the rate limiting described in this page does not work. Turn it off to have rate limiting.

UPDATE 2: There is the option of using Network Link Conditioner, a tool for developers that adds a pane to System Preferences. I guess you need a developer account to download it. This tool has ready-to-use profiles to simulate common network technologies like 3G, EDGE, DSL etc.

Just a quick script: a very simple bandwidth limiter for OSX.

#!/bin/bash -x

ipfw flush
ipfw pipe 666 config bw 4000kbit/s
ipfw pipe 667 config bw 600kbit/s
ipfw add pipe 666 src-port 443
ipfw add pipe 667 dst-port 443

The example above limits download from port 443 (http) at 4MiB/s and upload to the same port at 0.6MiB/s.

I use this to avoid monopolizing a 10/1Mbps cable connection while uploading videos to YouTube. Such services should include a bandwidth limiter, but anyway.

e-mail icon