VPN connection and internal DNS names

Posted by p_lider December 3rd, 2010

Sometimes after you connect to your VPN network by means of any VPN client (CiscoVPN, OpenVPN, etc.) you are not able to access network resources using their names, however you can access them using IP addresses. This is caused by the DnsCache service, which sometimes may cache wrong IP addresses for your internal network names.

To fix this irritating behavior clearing the dnscache will not always work. The best way to cope with this problem is to stop DnsCache service – after doing that every time you try access any network resource by its name, the DNS name query will be passed directly to your DNS servers omitting your local cache.

EDIT:

After some time I noticed one more problem with DNS especially when using VPNs established using RRAS. Simply the names were not being resolved by DNS servers provided by RRAS but they were trying to be resolved by DNS servers outside of VPN. This prevented accessing VPN network resources using names. The problem can be fixed by following the following steps:

  1. Go to Network Connections in Control Panel.
  2. Go to Menu: Advanced -> Advanced Settings -> Adapters & Bindings
  3. Move DialUp connections to the top of the list.
  4. Save changes by clisking OK button.
  5. In Windows XP & 2k also follow the instructions described under the following link: http://support.microsoft.com/default.aspx?scid=kb;en-us;311218
  6. Reboot your computer.

After performing the above operations you should not have any DNS issues when using VPNs on your computer.