Skip to content

Instantly share code, notes, and snippets.

@jacoelho
Last active July 18, 2017 08:19
Show Gist options
  • Save jacoelho/73d49c187c7031a45825df0c85596e6c to your computer and use it in GitHub Desktop.
Save jacoelho/73d49c187c7031a45825df0c85596e6c to your computer and use it in GitHub Desktop.
trafic shaping
# old mac
sudo ipfw pipe 1 config bw 300kbit/s;
sudo ipfw add pipe 1 dst-ip 0.0.0.0/0;
# to reset:
sudo ipfw flush
#
dnctl pipe 1 config bw 10Kbit/s delay 300
echo "dummynet out proto tcp from any to example.com pipe 1" |pfctl -f -
pfctl -e
pfctl -F /etc/pf.conf && dnctl -q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment