Vous êtes sur la page 1sur 3

Interesting Drivel

About

Selectively route traffic through VPN on OSX


(PPTP, L2TP/IPSEC)
by Rob on March 6, 2014, 0 comments
Whilst working from home I found a need to constantly have VPN access to corporate resources (intranet
and other internal systems) but without routing all traffic through the VPN.
Adding the relevant search domains and unchecking Send all traffic over VPN connection. is not good
enough unfortunately, im currently in an all or nothing scenario, so we need to manually route the traffic:
Create the file /etc/ppp/ip-up with following content:
#!/bin/sh
/sbin/route add SUBNET $5
Replacing SUBNET with the subnet(s) that you want to route through VPN (for ex. 192.168.0.0/16)
Change permissions on this file to execute as root:
chmod 0755 /etc/ppp/ip-up
Here are full step-by-step instructions for how I configured mine:
1) Run the following in a terminalsudo nano /etc/ppp/ip-up
2) Type the following into the file:
#!/bin/sh
/sbin/route add 10.12.0.0/16 $5
/sbin/route add 10.10.0.0/16 $5
3) Change the file permissions by typing the following in a terminal:
sudo chmod 0755 /etc/ppp/ip-up
Now re-connect your VPN and you should find you have access to the specified resources over the VPN, but
everything else is routed through the local internet connection.
Categories: Uncategorized

Rob
Passionate IT professional, freelance web designer, self confessed Nandos addict and music lover. Check
out my freelance web design portfolio here: acmeten
View all posts

Leave a comment

Your email is never published or shared.


your name
e-mail address
website url

your comment
You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite="">
<cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
submit your reply

Notify me of follow-up comments by email.


Notify me of new posts by email.

Latest Posts
03 Nov - Mac sluggish after Yosemite upgrade, WindowServer process hogging lots of CPU.
Suspected memory leak.
06 Mar - Selectively route traffic through VPN on OSX (PPTP, L2TP/IPSEC)
07 May - Windows 7 drag and drop isnt working, quick-fix.
02 May - How to remove a git alias

Latest Comments
SYM - Hey Rob! You are a ROCK STAR!!! I have been struggling with this for a few days and was
...
kishore - the Solution of clicking on one tab with Shift on has worked for me .. thanks
LN - the shift-click did the trick! Glad I found your site, thank you!
Margherita - Hello admin, i found this post on 13 spot in google's search results. You should ...

Monthly Archive
November 2014 (1)
March 2014 (1)
May 2013 (2)
April 2013 (3)
July 2011 (1)
January 2011 (1)
October 2010 (1)
September 2010 (3)
August 2010 (2)
July 2010 (1)
June 2010 (8)
May 2010 (2)

August 2009 (2)


May 2009 (1)
April 2009 (3)
February 2009 (3)
January 2009 (7)
December 2008 (1)
November 2008 (6)
October 2008 (4)
TrulyMinimal Theme by FlareThemes. Copyright 2015 Interesting Drivel. All rights Reserved.
Powered by WordPress.

Vous aimerez peut-être aussi