Created
September 14, 2017 09:46
-
-
Save soulgalore/82801f7ca0f120d5cb7f226833b88ad8 to your computer and use it in GitHub Desktop.
Set connectivity mac
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 | |
## Setup a delay | |
sudo dnctl -q flush | |
sudo dnctl -q pipe flush | |
sudo dnctl pipe 1 config delay 0ms noerror | |
sudo dnctl pipe 2 config delay 0ms noerror | |
sudo pfctl -f pfctl.rules | |
sudo dnctl pipe 1 config bw 780Kbit/s delay 100ms | |
sudo dnctl pipe 2 config bw 330Kbit/s delay 100ms | |
sudo pfctl -E | |
# Clear everything | |
sudo dnctl -q flush | |
sudo dnctl -q pipe flush | |
sudo pfctl -f /etc/pf.conf | |
sudo pfctl -E | |
sudo pfctl -d | |
### pfctl.rules | |
dummynet in all pipe 1 | |
dummynet out all pipe 2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment