We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

zingo on 03/24/08


Tagged

test debug osx cli ipfw firewall


Versions (?)


Emulating a Slow Internet Link for HTTP


Published in: Bash 


URL: http://terminalapp.net/emulating-a-slow-internet-link-for-http/

recover to normal speed with /sbin/ipfw delete 100 /sbin/ipfw delete 200 ... or reboot

  1. #!/bin/sh
  2.  
  3. /sbin/ipfw add 100 pipe 1 ip from any 80 to any out
  4. /sbin/ipfw add 200 pipe 2 ip from any 80 to any in
  5. /sbin/ipfw pipe 1 config bw 128Kbit/s queue 64Kbytes delay 250ms
  6. /sbin/ipfw pipe 2 config bw 128Kbit/s queue 64Kbytes delay 250ms

Report this snippet 

You need to login to post a comment.