Skip to content

Instantly share code, notes, and snippets.

@darrennolan
Created March 27, 2014 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrennolan/9816112 to your computer and use it in GitHub Desktop.
Save darrennolan/9816112 to your computer and use it in GitHub Desktop.
Basic ipfw usage to throttle your network connection on a Mac (Mountain Lion)
# Step 1: Creates a pipe that only allows up to 15KB/s to go through.
sudo ipfw pipe 1 config bw 15KByte/s
# Step 2: Add the pipe to downloads on port 80
sudo ipfw add 1 pipe 1 src-port 80
## OR ##
# Step 2: Add the pipe to uploads and downloads on all ports
sudo ipfw add 1 pipe 1 ip from any to any
# Step 3: Remove the pipe from the port.
sudo ipfw delete 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment