What's a good software solution to slow down internet connections on the mac for testing and simulations?

My primary need is when testing code in the iPhone / iOS simulator, so slowing down the connection for specific applications or processes would be great.

  • I found the accepted answer (Network Link Conditioner) to also be an excellent quick-and-dirty workaround for bufferbloat issues. – RTS - read about Monica Cellio Mar 22 '16 at 17:08

Apple has made a very handy official tool to slow down the network connections on you Mac for testing purposes.

The Network Link Conditioner preference is a free download from within Xcode (for Lion and later OS). Additionally, iOS has similar function accessible from within Xcode and iOS 6 or later.

enter image description here

Older versions of Xcode before version 4.3.2 embedded a copy of this tool. Now, you use Xcode to download it directly in a similar manner to the iOS simulators and developer documentation.

There are 11 built in profiles from a Lossy Edge network with 400ms delay to a cable modem. If you need other limits, you can create custom profiles with your own settings or you can also use ipfw yourself as described in Craig Hockenberry's article slow ride, make it easy It also mentions the Speed Limit panel by Mike Schrag that is a smaller download than Xcode, but has fewer options than Apple's tool.

It slows down the entire network stack, so you can't throttle on a per app basis without doing things like install lion in a virtual machine and set that VM with a throttled stack.

  • 1
    :O I even have Xcode and didn't know about this – Alexander Sep 4 '11 at 1:36
  • 22
    Be sure to shut it off after you're done testing! – Jason Salaz Sep 6 '11 at 18:51
  • 1
    Clarification: you actually have to download the hardware IO tools from Apple. See Installing Apples Network Link Conditioner Tool – daviesgeek Apr 20 '12 at 18:50
  • 2
    Speed Limit mentioned below works excellently. I'm using it now for localhost:8888 on MAMP. – Anriëtte Myburgh Apr 22 '12 at 23:27
  • 1
    Also note that iOS 6 has the network link conditioner for testing on the device. Access it via Settings->Developer under the "Network Link Conditioner" section. – Mike Weller Nov 21 '12 at 16:42

OS X 10.9 and earlier provide ipfw and it allows you to define custom firewall rules. Create a pipe with limited bandwidth using ipfw and you can run your tests and simulations.

  1. Create a pipe "1" limited to 500KBytes/s via

    sudo ipfw pipe 1 config bw 500KByte/s
  2. Guide all network traffic of port 80 through pipe "1" using

    sudo ipfw add 1 pipe 1 src-port 80
  3. When you don't need the pipe anymore, remove it from the port using

    sudo ipfw delete 1


  • If you want to set higher traffic barriers, you can use MByte/s
  • Port 80: standard port for unencrypted http traffic. This port is used for most browsing and downloading. You should be fine with this in most cases.
  • Port 443: standard port for SSL encrypted https traffic.
  • 10
    unfortunately, ipfw was removed in OS X 10.10 Yosemite – igo Nov 12 '14 at 11:21
  • You can use pfctl to throttle bandwidth on OS X 10.10+ - spin.atomicobject.com/2016/01/05/… – Eugene A Dec 22 '17 at 12:30
  • I've added an answer below that shows pfctl and dnctl example usage. – ubershmekel Jul 18 '18 at 7:49

Speed Limit is a System Preferences pane for intentionally and selectively slowing down specific ports and domains.

  • I like that it's more granular than the XCode tool mentioned in the accepted answer. Thanks for the suggestion. – sholsinger Sep 8 '11 at 18:42
  • 1
    Really, I found that "localhost" didn't work, switching to ip address did the trick. – OlliM Jan 2 '14 at 11:31
  • 4
    SpeedLimit is disfunctional as of OS X 10.10 since the firewall tool it uses was removed: github.com/mschrag/speedlimit/issues/13 – Robin Mar 22 '15 at 21:45
  • The link to Speed Limit is broken. – Jeff Holt Jul 19 '17 at 15:39
  • The source to Speed Limit appears to be non maintained now, but is available here and has a more up to date looking fork over here though I havent tested it at all – Brad Parks Sep 6 '17 at 11:34

To add to the accepted answer: it looks like you shouldn't need XCode, just an account at the Apple Developer website (simpler than first downloading the 2GB XCode package if you don't have it already).

Go to https://developer.apple.com/downloads and search for "Network Link Conditioner" or "Additional Tools for XCode", the latter being the name of the package it's found in.

To download it via Xcode 8.x:

  • Click on the Xcode menu
  • Go to Open Developer Tool > More Developer Tools...
  • This will open a page at developer.apple.com (Note: you may need to log in first)
  • Click on the '+' sign next to Additional Tools for Xcode 8.x
  • Click on the download URL
  • 2
    Welcome to Ask Different! Instead of writing an answer to edit someone else's answer, simply click the edit or improve this answer button below the post that you wish to improve. – grg Dec 17 '13 at 18:08

If you only need throttling for Web development, I can wholeheartedly recommend Charles. It's an excellent tool for debugging HTTP applications anyway, and among its many features, it's got a Throttle option. The software isn't cheap, but it does an excellent job.

  • I actually need it for the iPhone simulator.. and testing connections to a server – aneuryzm Sep 3 '11 at 18:33

Mac OS X 10.10+ users need to use dnctl and pfctl but documented usage examples aren't easy to find.

# Configure `pfctl` to use `customRule`. 
(cat /etc/pf.conf && echo "dummynet-anchor \"customRule\"" && echo "anchor \"customRule\"") | sudo pfctl -f -

# Define `customRule` to pipe traffic to `pipe 1`.
# Note this is the actual port definition, not a textual comment
echo "dummynet in quick proto tcp from any to any port 443 pipe 1" | sudo pfctl -a customRule -f -

# Define what `pipe 1` should do to traffic
sudo dnctl pipe 1 config delay 10000
sudo dnctl pipe 1 config bw 10Kbit/s

# DO NOT FORGET to undo these when you're done
sudo dnctl -q flush
sudo pfctl -f /etc/pf.conf

If you want to go all out and shape everything you can use:

echo "dummynet in quick proto tcp from any to any pipe 1" | sudo pfctl -a customRule -f -

I believe this also affects localhost pipes which slowed down my vs-code debugging, so be mindful of that.


You can also use ipfw piping to slow down your network.

First, setup a virtual "pipe" to limit throughput to 800KBit/sec:

ipfw pipe 1 config bw 800Kbit

Then you can setup rules to push traffic through that pipe (pipe 1). (ports 6881-6890 being bittorrent traffic)

ipfw add 10 pipe 1 tcp from any to me 6881-6890
ipfw add 11 pipe 1 tcp from any 6881-6890 to me

Here's another example to limit traffic down to 10Kbit/sec from a specific IP address:

ipfw pipe 2 config bw 10Kbit
ipfw add 15 pipe 2 ip from me to


  • ipfw was removed in OSX 10.10 – Ben Wheeler Sep 28 '16 at 16:15

For XCode 10.2, in More developer tools - Additional Tools for XCode 10.2, you will find Network Link Conditioner.

  • How is this solution different from answers already provided? – Nimesh Neema Apr 17 at 9:56
  • I've mistakenly downloaded Hardware tools even if it was for old XCode version, I thought it will work because I've not seen it for a newer version. There is nowhere written that for newly XCode 10.2 I have to choose Additional Tools to get the latest Network link conditioner. That's mentioned here so other developers don't waste their time. If you finding it not different than others, minus it fifteen times. I did it so other gets help from it by searching for Newly XCode 10.2 – Kiran Jasvanee Apr 17 at 12:14
  • It would really help anyone reading this answer if can you edit your answer and include this crucial information. Also, many users find having clearly written and step by step instructions really valuable. – Nimesh Neema Apr 17 at 12:17
  • @NimeshNeema I think all the developer knows in the community that you can find this tool via More developer tools. I've written the steps. I don't think so I should mention more in detail. – Kiran Jasvanee Apr 17 at 12:19
  • It's totally fine and upto you how you choose to write an answer. Mentioned are just generally followed practice rather than a rule :) – Nimesh Neema Apr 17 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .