Skip to content

Posts from the ‘VPN’ Category


I have also posted this on Bruce Cowpers blog!

Some users were calling me with issues saying they couldn’t use outlook because the mail server was not found, also not being able to map network drives while connected to the VPN, yet the VPN on our ISA server looked fine?

They could however map the network drive with the according internal IP.

Right away I knew this was a DNS problem. But what was extremely puzzling, was that half the VPN users had no problem, and some couldn’t do anything.

More research into this and after looking over every single setting on my ISA firewall and checking the DNS servers I found that our DNS wasn’t the problem at all, but rather the binding order of my clients.

After checking the obvious Network Connections Advanced settings to view the binding order, the Remote Access Connections was at the top of the list. BUT if you compared this to your registry located here:


Under the BIND KEY “\Device\NdisWanIp” or other words “Remote Connections” was at the bottom of all other devices

to fix this simply cut and paste your “\Device\NdisWanIP” to the top of the list, close regedit, and reboot the system.

Or you can copy and paste the script below in a notepad, save it as bind.vbs, open command prmot, and Cscript bind.vbs.

YOU MUST REBOOT in order for this to take effect!
Sub Main()
 const HKEY_LOCAL_MACHINE = &H80000002 ‘ Root Node that we want in the registry
 strComputer = “.”       ‘ Computer Name  “.” is equal to the local machine
 Set StdOut = WScript.StdOut    ‘ Setup the StdOut for writing
 ‘StdOut just writes out to the command window
 StdOut.WriteLine  “——————— Executing ——————————”
 ‘Here we’re getting a reference to a registry Object so that we can read/write from/to the registry
 Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & “\root\default:StdRegProv”)
 strKeyPath = “SYSTEM\CurrentControlSet\Services\Tcpip\Linkage” ‘The Key Path
 strValueName = “Bind”           ‘The Value Inside the key that’s the multi string

 ‘Get the list of VALUES from the registry
 oReg.GetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, arrValues
 Dim colNewVals           ‘dictionary object used to store the new sorted values sorted
 Set colNewVals = CreateObject(“Scripting.Dictionary”) ‘in the order that we want them to be written back to the registry
 StdOut.WriteLine  “This is the original array.”
 For Each strValue In arrValues
     StdOut.WriteLine  strValue
 StdOut.WriteLine  “”
 flag = false
 StdOut.WriteLine  “Grab what we were looking for.”
 For Each strValue In arrValues
  If strValue = “\Device\NdisWanIp” Then
   colNewVals.Add 0, strValue
   flag = true
   StdOut.WriteLine  strValue
   Exit For
  End If    
 StdOut.WriteLine  “”
 StdOut.WriteLine  “Checking to make sure we found what we were looking for.”
 If flag = false Then
  StdOut.WriteLine  “Nope exiting…”
  StdOut.WriteLine”\Device\NdisWanIp not found.”
  Exit Sub
 End If
 StdOut.WriteLine  “Yep Continuing”
 StdOut.WriteLine  “”
 StdOut.WriteLine  “Read in the rest of the values.”
 i = 1
 For Each strValue In arrValues
  If strValue <> “\Device\NdisWanIp” Then
   colNewVals.Add i, strValue 
   i = i + 1
   StdOut.WriteLine  strValue
  End If    
 StdOut.WriteLine  “”
 StdOut.WriteLine  “This is the new array.”
 For Each strNewVal In colNewVals.Items
     StdOut.WriteLine  strNewVal
 StdOut.WriteLine  “”
 StdOut.WriteLine  “Write the values back to the registry.”
 oReg.SetMultiStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,colNewVals.Items
End Sub