Skip to content

Instantly share code, notes, and snippets.

@vvasabi
Last active August 29, 2015 14:04
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 vvasabi/33de59064801f576e773 to your computer and use it in GitHub Desktop.
Save vvasabi/33de59064801f576e773 to your computer and use it in GitHub Desktop.
Emulate slower Internet speed. (Apple also provides a free Network Link Conditioner pref pane that does the same thing.)
#!/bin/bash
# Make Internet connection fast again
sudo ipfw delete 1
sudo ipfw delete 2
sudo ipfw delete 3
sudo ipfw delete 4
#!/bin/bash
# Note that for this to work with localhost, use the machine’s current IP, such as 192.168.0.1
sudo ipfw pipe 1 config bw 640KByte/s delay 100ms
sudo ipfw add 1 pipe 1 src-port 80
sudo ipfw add 2 pipe 1 dst-port 80
sudo ipfw add 3 pipe 1 src-port 443
sudo ipfw add 4 pipe 1 dst-port 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment