Adding client routes to pptp vpn

Posted on 2012-09-15
Last Modified: 2013-12-02

Using Windows SBS 2011, RRAS with PPTP for vpn connections.
We have two networks on different segments, both can be accessed from the server (this is handled by the router).

When a remote user connects using pptp to the server, he can only access the network that the server is connected to, unless executing locally the "route add .....etc'" command which tells the user's local computer to route packets for the second network to the same pptp interface.

We can however use TUNNEL mode to route everything to the pptp connection, this way it works and pptp users have access to both of the networks, but we really want to avoid it.

Maybe there's a feature or something that can be done on SBS 2011 to create this route automatically for the user ?

Question by:mariusk
    1 Comment
    LVL 77

    Accepted Solution

    Two possible options:

    1)  You can use CMAK (connection Manager Administration Kit) to create a custom deployable client and add routes:

    2) I wrote and have use the following script to add routes to client machines:

    Assuming VPN client gets a IP
    And the network to which you wish to route traffic is
    Following will not work on Vista (see blow for Vista or newer)

    Echo off
    If Exist Result.txt del Result.txt
    IPConfig >Result.txt
    For /F "tokens=2 delims=:" %%A IN ('Find /I "10.10.10." Result.txt') Do Set NewIP=%%A
    Rem ---------
    Rem test output (to be removed)
    Echo %NewIP%
    Rem ----------
    Rem Delete existing route if any
    route delete
    route add mask %NewIP%
    Del Result.txt
    Set NewIP=Nul

    On Vista or any use:

    Echo off
    If Exist Result1.txt del Result1.txt
    If Exist Result2.txt del Result2.txt
    IPConfig >Result1.txt
    Find /I "IPv4 Address. . . . . . . . . . . : 10.10.10." Result1.txt >Result2.txt
    For /F "tokens=2 delims=:" %%A IN (Result2.txt) DO SET NewIP=%%A

    Rem ---------
    Rem test output (to be removed)
    Echo %NewIP%
    Rem ----------
    Rem Delete existing route if any

    rem route delete
    rem route add mask %NewIP%
    rem Del Result1.txt
    rem Del Result2.txt
    Set NewIP=Nul

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
    I've written this article to illustrate how we can implement a Dynamic Multipoint VPN (DMVPN) with both hub and spokes having a dynamically assigned non-broadcast multiple-access (NBMA) network IP (public IP). Here is the basic setup of DMVPN Pha…
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now