This question already has an answer here:
I would like to use a VPN to access all sites external to our local intranet, but preserve local routing so that I can still access sites on the local intranet (e.g. in 10.0.0.0/8). I am using the Mac OS X native L2TP VPN client. How do I configure it to set this up?
I have tried something like
route add 10.0.0.0/8 [local router address], which works fine, but I would like to automate this process so I don't have to look up the local router address and run the command each time.