Created
April 12, 2013 10:50
-
-
Save isdyy/5371215 to your computer and use it in GitHub Desktop.
OSX で VPN接続中に特定IPへのアクセスをVPN経由にする
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/sh | |
# For OSX VPN custom routing | |
# | |
# Place this file at /etc/ppp/ip-up, edit its CIDRs, and enter following: | |
# shell> sudo chmod +x /etc/ppp/ip-up | |
# VPN gateway | |
if [ "${5:-}" = "192.168.100.1" ] | |
then | |
# example 01 | |
/sbin/route add 192.0.2.0/24 $5 | |
# example 02 | |
/sbin/route add 198.51.100.1/32 $5 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment