• February 23, 2025, 02:02:23 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: pptp vpn client-to-server and static routes  (Read 5404 times)

eltoncarvalho

  • Level 1 Member
  • *
  • Posts: 6
pptp vpn client-to-server and static routes
« on: October 31, 2011, 06:22:48 PM »

Hello,

I'm configuring a pptp vpn server and would like to use a ip pool with a network address different of my LAN. It works without problems if I set the "Use default gateway on remote network" option in the Windows vpn connection properties or if I add the route to the LAN using the command line but I can't find any option to do it automatically. I know that Windows RAS has a option to add static routes to the vpn client, but I can't find any configuration like this in the Netdefend 1660 web console or CLI.
Is there any way to do that?

Thank-you
Best Regards,
Elton
Logged

danilovav

  • Level 4 Member
  • ****
  • Posts: 424
  • Alexandr Danilov
Re: pptp vpn client-to-server and static routes
« Reply #1 on: October 31, 2011, 11:14:03 PM »

DFL can't push routes into client

Basically, you can use pool from lannet - Windows clients will add route for lannet

To get advanced routing, use connection script like below
In this example, 222 is remote net (need to add into client) and 223 is pptp net

Code: [Select]
@echo off
title PPP VPN caller and routing script

set VPN=RRAS_Name
set VPN_USER=user
set VPN_PASS=pass

echo Calling %VPN%...
rasdial %VPN% %VPN_USER% %VPN_PASS%

echo Removing old routing...
route delete 192.168.222.0

echo Applying routing...
ipconfig > temp1.txt
findstr "192.168.223." temp1.txt > temp2.txt
for /F "tokens=2 delims=:" %%f in (temp2.txt) do echo VPN client address %%f
for /F "tokens=2 delims=:" %%f in (temp2.txt) do route add 192.168.222.0 mask 255.255.255.0 %%f

if exist temp1.txt del temp1.txt
if exist temp2.txt del temp2.txt

echo Done
pause
Logged
BR, Alexandr Danilov

eltoncarvalho

  • Level 1 Member
  • *
  • Posts: 6
Re: pptp vpn client-to-server and static routes
« Reply #2 on: November 14, 2011, 07:11:42 AM »

Thank-you for the script.....
Logged