How to make remote IPs available on OS X’ PPTP VPN connections

OSX VPN RoutingLet 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 assigned. However, the local IP range on the external network is A server, which (as local user of the remote network) can be reached via for example, now (via VPN connection) has the IP Unfortunately it is not clear which server got what IP from the 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 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.).

Zugriff auf externe IPs im VPN in Mac OSX (1)Zugriff auf externe IPs im VPN in Mac OSX (2)

With the knowledge of the name of the interface, you can add the routing rule now.

sudo route add -net -interface ppp0

In the above command you only need to replace the 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.

Zugriff auf externe IPs im VPN in Mac OSX (3)Zugriff auf externe IPs im VPN in Mac OSX (4)

Leave a comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked