Windows XP not "seeing" or using hosts file

O

Oxford Systems

OK, I'm stumped. I use a custom hosts file (located in
c:/windows/system32/drivers/etc/) to block various ads and spyware URL's in
an attempt to save bandwidth and make the net more responsive on my dialup
connection. Never had a problem with this before but on a new install of
Windows XP Pro it seems that Windows is not "seeing" or using the hosts
file.

I have scanned the system for viruses and trojans using eTrust with the
latest sig, AdAware with the latest update file and Spybot S&D with all
updates. It's clean.

Searching Google last night turned up few suggestions and none that worked.
The Microsoft Knowledge Base is, for me, a hopeless morass. I can find the
true story of "Paul Bunyon and Babe the Blue Ox" in there but when it comes
to stuff that matters...well...some people seem to be better with it than
me.

Anyway, I have a hosts file. No extension. I have tried separating the IP
address both with a space and with tabs. Same result. Win XP ignores the
hosts files.

Any ideas?


A few sample lines in the space separated format follow:

# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
127.0.0.1 ads.x10.com

# 123Banners

127.0.0.1 123banners.com
127.0.0.1 control.123banners.com
127.0.0.1 ftp.123banners.com
127.0.0.1 ftp.control.123banners.com
127.0.0.1 www.123banners.com

# 247Media (Sabela)

127.0.0.1 247media.com
127.0.0.1 agami.247media.com
127.0.0.1 ap.www.sabela.com
127.0.0.1 au.www.sabela.com
127.0.0.1 exchange.247media.com
127.0.0.1 ftp.247media.com
127.0.0.1 FW-1250.247media.com
127.0.0.1 gw-7200-1250.247media.com
127.0.0.1 ms2.247media.com
127.0.0.1 ns.netsol.com
127.0.0.1 ns1.247media.com
127.0.0.1 sol.247media.com
127.0.0.1 uk.www.sabela.com
127.0.0.1 us.www.sabela.com
127.0.0.1 was.www.sabela.com
 
O

Oxford Systems

Oxford Systems said:
OK, I'm stumped. I use a custom hosts file (located in
c:/windows/system32/drivers/etc/) to block various ads and spyware URL's in
an attempt to save bandwidth and make the net more responsive on my dialup
connection. Never had a problem with this before but on a new install of
Windows XP Pro it seems that Windows is not "seeing" or using the hosts
file.



OK, this is sorta weird to me but it seems to work:

******************

http://accs-net.com/hosts/faq.html#19

(19.) What can I do if Hosts isn't working under Windows 2000 or XP Pro?

Windows 2000/XP Pro also includes a service known as the DNS cache. You can
locate it in your services listed as "DNS Client". To use Hosts or DNSKong
you may need to stop and disable this service. Some machines seem to run
Hosts without disabling this service. It is safe to turn it off and disable
it. You will likely never notice it is gone. As far as I can tell, no other
Windows operating system offers such a service.


******************

Of course this "fix" turns off DNS caching (not always a bad thing) but it
does seem to enable the hosts file.

I've added this comment to the top of my hosts file in case I forget:

#DNS Client Service Disabled to enable HOSTS file
#See Administrative Tools in Services if
#necessary to reactivate. Current setting to enable
#HOSTS is DNS Client stopped and disabled.
#Default setting is automatic and started
 
N

noone

the netstat command has a option to flush the dns cache, that's all you
have to do. of course rebooting will flush it too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top