How-To : Improve Your Internet Security The Simplest Way

One day, while editing the hosts file on OS X, i had this thought coming through my head - if i can use the same thing for good, like blocking all malwares and (ehem) pornographic sites, that mean one less app to install. And one less app equals to more resources for operating system to use. Its very simple to do and i cannot see why i can't recommend it over friends.

Disclosure : There's a risk doing this and you might end up reinstalling your operating system. Don't bill me for that.

What's the deal with this hosts file anyway?

According to wikipedia, :

The hosts file is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain text file, and is conventionally named hosts.

A whopping 18k of lines equals to 18k of sites. And yeah, i don't use Facebook.

Put it simple, we're going to block all those nasty sites by editing this single hosts file with a text editor (be it Notepad or Notes), write down few syntax and its done.

I've already precompiled every bad addresses that i found from multiple source on the internet into three txt files. You can choose to apply them all or just one, its your choice. I'm assuming you're doing this on your own computer. If you wanted the same thing on network level (blocking everyone else), contact your administrator. They know what to do. If they don't, fire them or hire me.

Or else, Spybot Search & Destory does the trick too.

The easiest way to access the hosts file is through the Command Prompt (Windows) or Terminal for OS X and Linux.

The following command should do the trick.

For Windows (You'll need to grant administrator access) :

notepad C:\Windows\System32\drivers\etc\hosts

and for OS X/Linux :

sudo nano /etc/hosts

and you should see something like this :

Download this collection of hosts file according to your operating system, extract it and you'll see three files in txt formatting. Double clicking those files should fire up the Notepad or Textedit. Its just a matter of copy and paste those lists into hosts file.

After that, save your hosts file and restart your system. Or, flushing the dns does the trick without having to restart.

If you got any better option, do share with me.

Posted September 5, 2013

Tweet this