#! /bin/sh
dr=`netstat -nr | grep ' UHLW ' | awk '{print $1}'`
route delete default AAA.BBB.CCC.DDD
route add default $dr
route add AAA.BBB.0.0 AAA.BBB.CCC.DDD
Where AAA.BBB.CCC.DDD is provided by the logfile of the PPTP connection application: "remote IP address AAA.BBB.CCC.DDD" . Then only connections to the AAA.BBB.x.y range of addresses will use the VPN.
[robg adds: I haven't tested this one.]

