Monday, June 11, 2007

the hosts file

I've usually considered the HOSTS file (\windows\system32\drivers\etc\HOSTS) to be a fairly foolproof method of blocking websites from giving you the nasties - viruses, spyware, dialers. It's like your computer can't even see these sites. There are a few websites around that maintain lists for download. HPGuru and MVPS are two recommended sites.

However, I think I've just found out that it's not good to have a huge number of entries in your HOSTS file.

A couple weeks ago I consolidated the HPGuru and MVPS entries into my HOSTS file. This brought it to 70-75,000 entries.

Around the same time I started having problems. My machine slowed down and started getting freeze-up errors with Windows Explorer, forcing me to reboot daily and sometimes more often. I have wireless, and dialup as backup. With the wireless, my ability to connect got bad. With the dialup, the modem would connect fine, but it would take six to ten minutes before any data transfer, and occasionally it would not transfer at all.

Something else I've been running on my computer for ages is DNSKong. This is a free program that also blocks sites. Here's the main difference between using the HOSTS file and using DNSKong:

In HOSTS, you have to name the specific, full name of the site you want to block. To block all the sites from spammer.com, you have to have separate entries for every one of their names. Some of these adsites own dozens of subdomains, e.g. spamserver1.spammer.com, spamserver2.spammer.com, spamserver3.spammer.com, etc. Each of these needs a separate entry in HOSTS. Hence, your HOSTS file fills up fast. Real fast.

With DNSKong, all you do is put in spammer into the Named.txt file. This covers all the above servernames, as well as spammer.biz, spammer.net, spammer.org, etc. It covers any new additions the owner of said website might add, so long as it includes spammer as a single dotted portion of the domain name. (i.e. spammer will not cover www.spammersite.com or buy.from.a.viagraspammer.com, these would need to be added as spammersite and viagraspammer.)

Today I uploaded the contents of my HOSTS file into FoxPro, did a little mishmashing on all the .com, .biz, .org, .info and .net entries, consolidated a unique list from that, and moved them out of HOSTS and into DNSKong, bringing HOSTS down to 4300 entries.

I dialed up. Connected. Went to a bookmarked website. Got in right away, BANG.

Coincidence? I think not.

No comments: