Set no default route for VPN Client via PPTP/L2TP
Jun 16, '05 08:37:00AM • Contributed by: Anonymous
Jun 16, '05 08:37:00AM • Contributed by: Anonymous
It seems to be a common problem that, when connecting with Mac OS X VPN client to a VPN server, you end up with getting a default route to that server. But in some cases, you'll still want to use your original internet connection by default, and only have the routes for the remote VPN pointing to the VPN server.
I found some solutions on the net (most of them involved making a wrapper around pppd or hacking some of the system scripts), but they are neither a proper nor one-size-fits-all solution. The right way to do it is as simple as this... Put the keyword nodefaultrouter into the file /etc/ppp/peers/your-vpn-name. Then create a script called /etc/ppp/ip-up with the following contents:
[robg adds: I haven't tested this one.]
I found some solutions on the net (most of them involved making a wrapper around pppd or hacking some of the system scripts), but they are neither a proper nor one-size-fits-all solution. The right way to do it is as simple as this... Put the keyword nodefaultrouter into the file /etc/ppp/peers/your-vpn-name. Then create a script called /etc/ppp/ip-up with the following contents:
#!/bin/sh
route add 10.0.0.0/8 -interface ppp0
Replace 10.0.0.0/8 with the network address of your VPN. I hope this helps.
[robg adds: I haven't tested this one.]
•
[37,057 views]
