[pptp-server] routing problem solved

barjunk barjunk at attglobal.net
Thu Jun 27 11:16:33 CDT 2002


Richard,

That is exactly what I did.  This may only work for Win2k and XP. Here
is the batch file:

--- cut here --

@echo off
rem Change the quoted entry below to match your VPN connection name
rem Change the * to an actual password to bypass prompt although
rem this is not recommended
rasdial "VPN" <username> *
erase route.txt > nul
route print | find "<remote client net>" >> route.txt
for /f "tokens=3" %%1 in ('type route.txt') do set GATEWAY=%%1
route add 192.168.1.0 mask 255.255.255.0 %GATEWAY%
set GATEWAY=

--- cut here ---

A couple of notes:

- the remote client net would be the network associated with the
remoteip setting in the pptpd.conf file

- in the case where the client has a natted connection behind, for
example a linksys firewall, you may have to change the route command and
add other route commands to the specific hosts the client needs to
connect to.  This is because the linksys (at least the one I was using)
doesn't have the ability to change the internal private network.  All
you can change is the last numbers in the IP address.

If anyone does come up with a good solution, please let us know!

OTHER IDEAS:

it is possible to set up static routing entries in the Registry, however
I find this solution to be kludgy.


Mike
On Thu, 2002-06-27 at 05:16, R. de Vroede wrote:
> Mike,
> 
> This question has been posted a couple of times and I haven't heard
> a decent solution. You could distribute a batchfile with the route add
> to your users and let them place it in startup or execute it every time
> they connect.
> 
> Regards,
> Richard
> 
> > If I use the ip address that was given to the client (192.168.4.70) as
> > the gateway address, I can add this by hand on a WIN2k client by
> > issuing:
> > 
> > route add 192.168.3.0 mask 255.255.255.0 192.168.4.70
> > 
> > Is there any way to have this be done automatically on the Win2k client?
> > 
> > Mike
> 
> 
> -- 
> Richard de Vroede
> (r.devroede at linvision.com)
> ------------------------------------------------
> Linvision BV         Provides Linux Solutions
> Elektronicaweg 16D
> 2628 XG Delft
> T: +31157502310      info at linvision.com
> F: +31157502319      http://devel.linvision.com
> ------------------------------------------------
> 





More information about the pptp-server mailing list