-
-
Save sckn/e664c9770e9abe7d401c5cd5d1769603 to your computer and use it in GitHub Desktop.
Change gateway
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 | |
# vim /usr/local/bin/cgw | |
# chmod +x /usr/local/bin/cgw | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep My_Home_SSID >/dev/null || exit 0 | |
route delete default | |
route add default 10.1.1.40 | |
networksetup -setdnsservers Wi-Fi 10.1.1.40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment