Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to route just specific traffic (a specific domain) on my Mac over my company VPN. This seems to be the most recommended way to do it,

Create the file /etc/ppp/ip-up with following content:

#!/bin/sh /sbin/route add SUBNET $5 replacing SUBNET with subnet, you want to route through VPN (for ex. 192.168.0.0/16)

execute as root:

chmod 0755 /etc/ppp/ip-up This file will be executed each time you connect to VPN.

...but I don't understand how to determine the SUBNET value. Do I need to create a subnet? Is the subnet name for the VPN in network preferences somewhere? I really don't have a good idea of what a subnet even is, so I'm not following how to implement the solution above.

share|improve this question
    
this belongs on SuperUser I think as per the question the OP links to. –  Stu Wilson Jun 16 '12 at 10:07
    
@StuWilson Assuming OP is using a Mac, this is on topic here. It's also on topic for SU, so if it doesn't get attention here we can try migrating it (if OP wants). –  Nathan Greenstein Jun 16 '12 at 15:46
add comment

1 Answer 1

You don't need to create a new subnet, you just need to figure out what subnet (or subnets) your company's network uses. For example, if the IP addresses on your company's network are in the ranges 10.0.0.1 to 10.0.0.255, then you can use the subnet mask "10.0.0.0/24". If the range is 10.0.0.1 to 10.0.255.255, then you can use the broader range "10.0.0.0/16". You can search for "subnet calculator" to find some tools that can help you figure out the notation for the subnet range you want to capture.

Make sure your local network doesn't overlap with the range, though. Your home network should use a different subnet (like 192.168.0.0/24 for example) that won't conflict with your office's network.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.