Let me describe the initial situation: I connect my Macbook via PPTP VPN with an remote network using the standard OSX VPN client. While the VPN connection is established, however, there is the following problem.
All devices on the remote network get IP addresses within the range 10.8.0.0/24 assigned. However, the local IP range on the external network is 192.168.178.0/24. A server, which (as local user of the remote network) can be reached via 192.168.178.11 for example, now (via VPN connection) has the IP 10.8.0.45. Unfortunately it is not clear which server got what IP from the 10.8.0.0/24 block of adresses.
Add routing rule for PPTP VPN connection on OSX
The solution is quite simple in this case. The only condition so that subsequent workaround will be successful is that the IP range in which the Macbook is, is an other than the local range of the external network. If the Macbook is therefore also in a 192.168.178.0/24 network, subsequent solution may not work properly.
To make the remote computers available under their well-known IPs, a new routing rule (=route) must be added. This can be done via the terminal of OSX system.
With the command
ifconfig -a
you can show all network interface. In the output of the ifconfig command you should find the VPN interface’ name. (Therefore the PPTP connection logically should be established before executing the command, otherwise there might be no VPN interface which can be shown by ifconfig.).
With the knowledge of the name of the interface, you can add the routing rule now.
sudo route add -net 192.168.178.0/24 -interface ppp0
In the above command you only need to replace the 192.168.178.0/24 by the destination network of your VPN connection and the ppp0 with the name of your VPN interface. After execution of the command the computers from the remote network should be reachable under their well-known IP addresses.