Created
July 6, 2012 09:07
-
-
Save gartmeier/3059092 to your computer and use it in GitHub Desktop.
Mac FireWall (ipfw) Bandwidth Control Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SUDO_PASSWD='***' | |
echo $SUDO_PASSWD | sudo -S ipfw pipe 1 config bw $1kbit/s | |
echo $SUDO_PASSWD | sudo -S ipfw add pipe 1 dst-ip 0.0.0.0/0 | |
read -p "hit enter to flush..." yn | |
echo $SUDO_PASSWD | sudo -S ipfw flush |
KByte/s is possible too
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have to replace sudo with SUID or something suitable