Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add private ip route for mac #10

Merged
merged 1 commit into from Mar 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions chnroutes.py
Expand Up @@ -77,7 +77,10 @@ def generate_mac(metric):
fi

dscacheutil -flushcache


route add 10.0.0.0/8 "${OLDGW}"
route add 172.16.0.0/12 "${OLDGW}"
route add 192.168.0.0/16 "${OLDGW}"
""")

downscript_header=textwrap.dedent("""\
Expand All @@ -89,7 +92,10 @@ def generate_mac(metric):
fi

ODLGW=`cat /tmp/pptp_oldgw`


route delete 10.0.0.0/8 "${OLDGW}"
route delete 172.16.0.0/12 "${OLDGW}"
route delete 192.168.0.0/16 "${OLDGW}"
""")

upfile=open('ip-up','w')
Expand Down