Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

KM (4)

KM
  (email not shown publicly)
AOL IM: perlguy13 (Add Buddy, Send Message)

I wrote a book, maybe you will buy it. Writing CGI Applications with Perl [perlcgi-book.com]

Journal of KM (4)

Thursday July 01, 2004
09:14 AM

OS X and split-tunnel VPN

[ #19623 ]
I connect to a VPN, and sometimes have an issue. When the VPN gets disconnected for some reason (not because I disconnected it), my default gateway route seems to change to something I don't want.

Here is what I have in my /etc/ppp/ip-up:

/sbin/route delete default ip.of.the.vpn
/sbin/route add default 192.168.1.1
/sbin/route add XXX.XXX.0.0 ip.of.the.vpn
/sbin/route add NN.NNN.0.0/16 ip.of.the.vpn

When I connect, this is fine. All my VPN traffic goes through the VPN, and uses all things VPN. And, when I connect to the rest of the world, it works fine. So, it's a split-tunnel.

And, my ip-down:

/sbin/route add XXX.XXX.0.0
/sbin/route delete NN.NNN.0.0/16
/sbin/route add default 192.168.1.1

When I disconnect by hand, this works fine. I could probably have nothing in this file, but do.

But, those random disconnects (and reconnect) seem to sometimes make my default gateway the ip.of.the.vpn. I don't notice until Adium suddenly disconnects, and I do a netstat to look at the routing table... then I have to run ip-up by hand.

Anyone have any suggestions?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.