Skip to content

Instantly share code, notes, and snippets.

@landonf
Created July 10, 2010 17:53
Show Gist options
  • Save landonf/470895 to your computer and use it in GitHub Desktop.
Save landonf/470895 to your computer and use it in GitHub Desktop.
Simple example of using ipfw to simulate poor network conditions. Handy for mobile performance testing.
# Packet loss rate (percentage, 0.0-1.0)
PLR=0.25
# Delay in ms
DELAY=300
# Host to filter
HOST=example.com
ipfw pipe 1 config bw 800Kbit plr "$PLR" delay "$DELAY"
ipfw add 1337 pipe 1 ip from any to "$HOST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment