Windows 7 does not follow host file entry.

raysteinhauser used Ask the Experts™
I have a hardware based vpn (SonicWall) between two sites. The clients at the remote site connect to the Exchange on the SBS 2003 server. On the XP Pro machines to get it to function correctly I put an entry in the hosts file with the ip and fqdn. We recently upgraded several machines to Windows 7 Pro, when  I tried to do the same with the hosts file it simply does not follow it. I edited the hosts file in administrative mode and made the change, if I look at the file the entry is there. I tried several variations on ip and machine name and still does not work. Thanks
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Did you also do an ipconfig /flushdns and arp -d * after the hosts file change?
Hi there;

Are there any proxies installed? Check browser too? What about VPN? Are there any VPN stuff in the area that the machine connects?

Why not post at least a few of the relevant lines in your hosts file? localhost
some.ip.with.numbers address

Simply choose one of the ip-address conjugates and apply the followings
ping address
nslookup address

More over could you try for https instead of http, so we can narrow the problem.

Best regards.
you cannot apply arp -d in 7. A bug from Vista.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

For proof of arp:

Naturally, all 7 OSed machines are subjected to APR poisoning.


DNS flushed, no change.

The host file is default except for one additional entry which is;  machinename.domainname.local

Nothing was changed on the network except for two machines were changed out, so there should not be any "other" vpn's.

I am simply using this hosts file so that the Exchange client can find the Exchange server.


ping address results?
nslookup address results?


Could you check for proxies in internet explorer/mozilla from option/preferences?


If I ping the machine name I get cannot find host. I can ping the ip of the server. NSlookup times out. For HTTPS are you asking if I can get to the webmail on the Exchange server ? If so I can via ip address/exchange but not machine name with http or https.


No proxies.

I'd recommend you check the registry at (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\ServiceProvider) to see if something has changed the default Name Resoultion Order.  In particular, you should verify that they are in the following order;
LocalPriority, HostsPriority, NdsPriority, and NbetbtPriority


It lists;
Class (8)
DNSPriority (2000)
HostsPriority (500)
LocalPriority (499)
NetbtPriority (2001)
Hummm... let's try a simple test.   On one of those Win7 boxes add a bogus entry like this:       testing123
then try to ping testing123.   It should resolve the name correctly to, but  (obviously) there will be no replies.
This will test the Win7 Name Resolution by itself without the VPN or a real PC having anything to do with it.
A couple of basic questions:
  1. What did you use to edit the hosts file?
  2. Is this a 64-bit version of Win7
  3. Do  you have both "standard" IP and IPv6 installed?


Graye - You get the points because you pointed me in the right direction. When I added the testing123 to the host file and tried to ping I still got the "could not find host" error. I was going to default the hosts file but before I did that I browsed to the folder and noticed the hosts file had a notepad icon. I unchecked hide extensions for known file types and it showed the hosts file had a .txt file extension. Removed the extension and it works now. Thanks all.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial