[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Adding client routes to pptp vpn

Posted on 2012-09-15
1
Medium Priority
?
810 Views
Last Modified: 2013-12-02
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.
0
Comment
Question by:Marius Kaizerman
1 Comment
 
LVL 78

Accepted Solution

by:
Rob Williams earned 2000 total points
ID: 38402382
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to fix a SonicWall Gateway Anti-Virus firewall blocking automatic updates to apps like Windows, Adobe, Symantec, etc.
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

873 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