During a recent rash of malware infections on students’ laptops, most of which were probably drive-bys or served by frames in otherwise innocuous pages, I remembered a solution that had once served me well: A HOSTS file. As you know, a HOSTS file is a text file on your computer that is used to map host names to IP addresses, but did you know that this was the precursor to DNS? Back in the ARPANET days, this file was manually updated as new hosts came on line or their addresses changed. The file was shared with the members of the network so they could all communicate. DNS made sharing and updating host addresses automatic and relegated the HOSTS file to use mostly on local networks.
While the file isn’t broadly used on most networks these days, it remains an integral part of the networking stack on all operating systems. It is the first thing that is checked prior to routing traffic and usually takes precedence over DNS. This makes it very useful for blocking access to unwanted web sites or servers. All you have to do is make an entry in HOSTS.TXT that points the web site or server address to the local machine address, 127.0.0.1. The good folks over at MVPS.org for years have been maintaining a hosts file that does just that. It contains thousands of malicious, useless, or unwanted websites.
I’m going to try using this again on some student laptops and see if it helps. I’ll let you know. In the meantime, you can read all about it and download the file for yourself here.