This morning, I found a list of domains that the nice people at FProt posted which are likely to be bringing bad things, and their names have to do with swine flu. So I set out to add them to my hosts file, to avoid any problems from them.
Darned if my hosts file wasn’t completely empty — just the stuff that Windows brought with it.
So I looked around and found a few more robust hosts files, downloaded them, sorted them, and then merged them, culling out the duplicates. I did all this quickly and easily with some standard command line applications under Cygwin (sort, comm, and grep — my first time with grep — and a perl one-liner I snagged from someplace).
Now, there are places where you can get updated hosts files with frequent updates, and I won’t be updating this file all that soon, but, in case somebody wants to try it out, you can check it out here. Copy and paste that onto the end of your hosts file, and you’ll be a lot less vulnerable to ad servers and nasty things on different websites.
For some guidance about how to do this under Vista, this article is quite useful — especially the comment half-way down about setting up a short-cut to allow you to do it quite easily. And, for those who don’t know what I’ve been talking about all this time, a hosts file is a list of domain names and ip addresses. When you try to access a domain name, your system will look to see if that domain name is on that list, and, if it is, will use the ip address listed for it in the place of that domain name. The hosts file I’m talking about here lists domain names of domains that serve up ads, malware, and bad things, and gives 127.0.0.1 as the ip address for all of them. 127.0.0.1 is the address for the local system (aka “localhost”), and, by pointing all those domain names at it, none of the files on those nasty domains will be loaded on your computer, because it will look for them on itself, and they aren’t there — all requests will time-out instead.
If you find that something you want to do is blocked by this, just edit the file and remove the name of the domain you want to reach. Not complicated.