Thanks David,
After posting I figured out what I was doing wrong. To add routes with
CMAK like we want to do it, one needs to turn on the "use gateway on remote
network" option in the profile and then use the "REMOVE_GATEWAY" option in
your route script file. Otherwise CMAK uses the original PC's gateway for
your specified routes gateway. Your solution also does what I was l was
needing. I may have to use it afterall due to some permissions issues. If I
wind up using it Ill let you know if it works for us too.
"David" wrote:
> Hi,
>
> I think I had the same issue as you last week or so. You want internet
> traffic to go from the VPN client directly to the internet, not through the
> VPN first, but you also want one or more network ranges to go through the
> VPN?
>
> Add this .vbs script to the profile
>
> '==========================================================================
> '
> ' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 4.0
> '
> ' NAME: VPN IP - gateway 2 network
> '
> ' AUTHOR:
> ' DATE : 5/05/2006
> '
> ' COMMENT: possible trouble when you are connected to 2 or more VPN server
> at the same time
> ' as there will be multiple adapters named "WAN (PPP/SLIP) Interface" !
> '
> '==========================================================================
> Dim WshShell, IP
> Set WshShell = Createobject("WScript.shell")
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
> & strComputer & "\root\cimv2")
>
> Set IPConfigSet = objWMIService.ExecQuery("Select * from
> Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
>
> For Each IPConfig in IPConfigSet
> If Not IsNull(IPConfig.IPAddress) Then
> For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
> If ipconfig.description = "WAN (PPP/SLIP) Interface" then
> IP = ipconfig.ipaddress(i)
> Set oShell = CreateObject("WScript.Shell")
> iRC = oShell.Run("route add 10.37.102.0 MASK 255.255.255.0 " &
> IP, 0, True)
> End If
> Next
> End If
> Next
>
> ' <== End script ==>
>
>
>
> Can you let me know if it worked?
>
>
> regards,
>
> David
>
>
> "Jackson" <(E-Mail Removed)> wrote in message
> news:4A8CFA0A-46D2-436B-93E3-(E-Mail Removed)...
> >I am trying to use CMAK to add some routes when a PPTP connection is
> > established. Is it possible (and how) to specify the VPN IP or interface
> > in
> > the CMAK script as the gateway if I dont know beforehand what that IP will
> > be? I have tried using the "DEFAULT" variable as described in the help
> > file
> > but this uses the client PC's default gateway and not the VPN address
> > recieved. I am unable to use the A/D add status route option in this
> > situation so I must use CMAK. Also I cannot use the "Use default gateway"
> > option either. Can this be done.
> >
> > Example:
> >
> > I want to add the following route after VPN established
> >
> > 10.37.102.0 mask 255.255.255.0 (VPN IP)
> >
> > to force traffic to this subnet over the VPN.
>
>
>
|