PPTP routes on Linux

Using pptp-linux client to establish PPTP connections does not automatically generate a route to make the remote network subnet fully accessible, only the host-to-host link. If you don’t wish to set the defaultroute option, then you can use the following script to create a 24-bit subnet route:

/etc/ppp/ip-up.d/pptp-route:
SUBNET=`echo $PPP_LOCAL | awk -F . '#39;`
route add -net $SUBNET netmask 255.255.255.0 dev $PPP_IFACE

Note:
The calling script (ip-up) will provide the values for $PPP_LOCAL and $PPP_IFACE.