Adding client routes to pptp vpn

Hi,

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 ?

Thanks,
Marius.
Marius KaizermanITAsked:
Who is Participating?
 
Rob WilliamsCommented:
Two possible options:

1)  You can use CMAK (connection Manager Administration Kit) to create a custom deployable client and add routes:
http://blog.lan-tech.ca/2012/01/30/windows-vpn-client-deployment/

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

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

Echo off
Cls
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%
pause
Rem ----------
Rem Delete existing route if any
route delete 10.20.20.0
route add 10.20.20.0 mask 255.255.255.0 %NewIP%
Del Result.txt
Set NewIP=Nul

On Vista or any use:

Echo off
Cls
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%
pause
Rem ----------
Rem Delete existing route if any

rem route delete 10.20.20.0
rem route add 10.20.20.0 mask 255.255.255.0 %NewIP%
rem Del Result1.txt
rem Del Result2.txt
Set NewIP=Nul
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.