Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

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 to, then you can use the subnet mask "". If the range is to, then you can use the broader range "". 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 for example) that won't conflict with your office's network.

share|improve this answer

Your Answer


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.