Unable to block IP addresses with hosts file

I'm having trouble trying to block IP addresses using the Windows hosts file trick. The only lines in the hosts file (besides the original commented out (#)) lines are these:

127.0.0.1 localhost 127.0.0.1 aim.com 127.0.0.1 aimexpress.aim.com 127.0.0.1 aimexpress.aol.com 127.0.0.1 my.screenname.aol.com 127.0.0.1 toc.oscar.aol.com

My goal is to block my browser from reaching the above AOL websites. Despite these entries, the browser still reaches these sites. I've also tried adding these sites to to the Restricted sites zone in Internet Explorer to no avail. Furthermore, it doesn't really matter what domain name I put in the hosts file or the Restricted sites zone, the sites are still accessable to my browser--even after I've cleaned out the cache and rebooted.

I'm running WinXP Home and connect to the internet through a LinkSys BEFSR41 v2 cable modem to RoadRunner.

What am I missing?

-dirk

Reply to
dirk
Loading thread data ...

hosts files should contain FQDN and not just root domain (ie...www.aim.com, creepy.aim.com). It doesn't work like a DNS zone does, you have to do full names.

Also, check your node type because that also determines the order in which names are looked up. It should be Hybrid, but check it anyway.

Reply to
Munpe Q

Did you make sure your local DNS cache was cleared? See if there is a "DNS Client" NT service (run the services.msc applet). If it is there, it is probably started and caching up the positive lookups (negative responses also get cached). To clear the local DNS cache, run:

ipconfig /flushdns

Or stop the DNS Client service. The cached entries get used before using the hosts file (i.e., the IP addresses are already known in the cache so a lookup is not needed from the hosts file). Positive responses (i.e., IP names for which an IP address was returned from the DNS server) get cached for a day by default.

See Microsoft's KB articles at

formatting link
and
formatting link
Make sure your hosts file is in the correct path (%SystemRoot%\\system32\\drivers\\etc\\hosts), has no extension (and has no trailing period). You might also want to check what permissions are assigned to the file.

Reply to
_Vanguard_

Thanks! _Vanguard_ and Munpe Q! I cleared the cache and added the lines to the hosts:

127.0.0.1
formatting link
127.0.0.1 aol.com 127.0.0.1
formatting link
127.0.0.1 aim.com 127.0.0.1
formatting link
127.0.0.1 aimexpress.aim.com 127.0.0.1
formatting link
127.0.0.1 aimexpress.aol.com 127.0.0.1 my.screenname.aol.com 127.0.0.1 toc.oscar.aol.com Alls working fine now! Appreciate the assist!

-dirk

Reply to
dirk

There is a great program for working with the hosts file. its Hostsman learn more about it here:

formatting link
its also free.

Reply to
salwithed

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.