Skip to content

Instantly share code, notes, and snippets.



Last active Dec 20, 2015
What would you like to do?
A bash script to temporarily slow down your intertubes on MacOS.


Simulate a slow network connection with one command.

Turn on:

$> sudo ./slow-it-down
Your tubes are now filled with molasses

Oh snap, the internet is like 1998, turn it off:

$> sudo ./slow-it-down
Your tubes will be unclogged:
Are you sure? [yn] y

Flushed all rules.
if [[ "$1" == -h* ]]; then
echo "Slows down your internet connection to approx 800kbps."
echo "Usage: sudo $0"
echo " Each invocation toggles the state of the slowdown on or off."
echo "Note: you'll likely have to sudo this this script"
exit 1
output=$(ipfw show 2>&1)
if [ "$?" != 0 ]; then
echo "Got this error when running ipfw:"
echo $output
echo "You likely have to use sudo this script: sudo $0"
exit 1
echo "$output" | grep 00100 >/dev/null
if [ "$found" = 0 ]; then
echo "Your tubes will be unclogged:"
ipfw flush
echo "Your tubes are now filled with molasses"
ipfw add pipe 1 all from any to any >/dev/null
ipfw pipe 1 config bw 800Kbit/s >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment