Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

C:\WINDOWS\system32\drivers\etc\hosts

Seems it's no longer working after I switch on the VPN.

Is it the case ,or just my own mistake?

share|improve this question
1  
Are you sure it is no longer resolving addresses from the hosts file, or could it be that the VPN you are connecting to does not allow local LAN access (like many Cisco VPNs do)? –  KJ-SRS Dec 19 '10 at 22:22
add comment

3 Answers

The hosts file supersedes remote DNS lookups, no matter how you're connected. So the name-to-IP mapping shouldn't change. However, VPNs often change the nature of your connectivity, which can change which server responds to the IP address you've assigned.

share|improve this answer
    
I'm using OpenVPN,have you ever used that? –  flv Dec 24 '10 at 13:43
add comment

hosts should work fine. What kind of VPN software are you using? Could it be disabling the hosts file or using its own by changing registry keys?

http://support.microsoft.com/kb/314053

Compare the values before/after.

share|improve this answer
add comment

Yes this is normal as the VPN server is pushing his own DNS servers onto the local host.

So they must be declared in the remote "hosts" file (on the server) or there must be an entry in the remote DNS server.

share|improve this answer
4  
-1. The hosts file is used by the DNS client, even on the DNS server. The DNS server hosts file is used by the DNS client component on the DNS server, not by the DNS server component, so it's of no use to any DNS client using that DNS server for DNS name resolution. –  joeqwerty Dec 19 '10 at 12:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.