Last active
March 27, 2022 10:24
-
-
Save shahidcodes/b69c84de268303de40d634ec533d361c to your computer and use it in GitHub Desktop.
Use vpn for specific subnets on MacOS
This file contains hidden or 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/sh | |
# Stackoverflow - https://superuser.com/a/1111215 | |
sudo route delete -net default -interface ppp0 | |
sudo route add -net 0.0.0.0 -interface en0 | |
sudo route add -net 172.17.0.0 -netmask 255.255.0.0 -interface ppp0 | |
sudo route add -net 115.84.158.0 -netmask 255.255.255.0 -interface ppp0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment