@haokuixi
2015-03-20T22:40:44.000000Z
字数 668
阅读 2436
macos
vpn
Me and my colleagues at work were facing a problem. We're using a VPN to access our internal servers and for some reason Mac OS X always uses a 24 bit netmask with the VPN connection (when we need a 16 bit). Of course there's a solution for this.
Open your favourite text editor. Type in the following text (we happen to use the 172.16.0.0/16 network, adjust please):
#!/bin/sh
/sbin/route add -net 172.16 -interface ppp0
Save this file as ip-up without .txt in the end.
Open Terminal and move the file to /etc/ppp with sudo, "sudo mv /Users/username/ip-up /etc/ppp" assuming you saved it in your home folder.
The last step is to add execute permissions to the file: "sudo chmod 755 /etc/ppp/ip-up"
The route should now be added every time you connect with VPN.