Thursday, July 12, 2012

Windows does not use my VPN connection DNS!

I have  problem on one of my systems where I frequently use my VPN connection to link to the office. The problem is that the DNS resolution always seemed to go through the main WAN connection system, and never defer to the VPN connection DNS servers.

It may be related to newer WAN DNS that return results and do web redirection for "unknown" connections, instead of returning no match.

After some basic searching, I cam across this post that had a solution:

Force Windows to Use a VPN's DNS Server

Going through these instructions solved my problem. I am running Windows 7 x64 and the solution took effect immediately upon restarting my VPN client.

For reference, this is what I did:

  1. Open Regedit.
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage
  3. In the right pane, double-click Bind
  4. In the value text box, select the "\Device\NdisWanIp" item, press CTRL+X, click the top of the list of devices, and then press CTRL+V.
  5. Click OK, and then quit Registry Editor.
  6. Restart your VPN connection.

2 comments: