Skip to content

Instantly share code, notes, and snippets.

@buddhisthead
Created August 1, 2012 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buddhisthead/3230974 to your computer and use it in GitHub Desktop.
Save buddhisthead/3230974 to your computer and use it in GitHub Desktop.
Mac OS X IP firewall for traffic limiting
This snippet uses the IP firewall rules on Mac OS X to limit traffic between two specific machines. Access to other addresses, like the internet is unchanged.
sudo ipfw pipe 1 config delay 30ms
sudo ipfw pipe 2 config delay 30ms
sudo ipfw add pipe 1 ip from 192.168.1.4 to 192.168.1.7
sudo ipfw add pipe 2 ip from 192.168.1.7 to 192.168.1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment