Access Denied

 

 

Free blocking tips

Free tools & programs

Content Filters

Antivirus Programs

 

Online virus scan

 

net_nanny1
Webroot Software Inc.

 

If you’re looking to do some basic filtering / blocking web sites on your computer(s), or want to prevent people from going places on the internet they don’t belong, one of the easiest ways is through the use of the hosts file. When the typical computer goes to a web address, it contacts a DNS server. Simply put, a DNS server translates the website name into a series of numbers, called an IP, or Internet Protocol address, typically a series of 4 numbers, such as 192.168.1.1.

I will not get into a full explanation of the reserved IP ranges, TCP protocols, etc here, but will attempt to explain in a basic manner how you can use this information to assist with blocking websites on your personal computer. 

The hosts file.
Normally, before your computer contacts the DNS server to translate the web site name into the corresponding IP address, it first reads a file on your computer, simply called HOSTS. On a modern Microsoft Windows computer, the hosts file is located in the c:\windows\system32\etc\drivers folder. If you are still running windows 95 or 98 it is located directly in the windows folder. Occasionally, a computer manufacturer or installer may install Windows to an alternate directory, often Winnt. Either way, unless you are running Windows 95 or 98, the easy way to get to the file we want to modify is to click on the start button, and type or paste this in:

 %windir%\system32\drivers\etc

Then click “OK””, and you should see the contents of the folder displayed.

Open the Hosts file. Windows should ask what you would like to open it with. Choose notepad.

You should see something like the following on the last few lines:

# For example:
#
#   102.54.94.97   rhino.acme.com     # source server
#    38.25.63.10   x.acme.com       # x client host

127.0.0.1    localhost

Everything with a “#” in front of the line is commented out, and not read by the operating system.

Note the last line is not commented out with a “#”, meaning it is telling windows the the computer named “localhost” is located at the IP address of 127.0.0.1

Here’s were the fun begins!

For example, if you wanted to prevent someone from going to to “crappywebsite.net”, you would add a line below the last line, like this:
127.0.0.1    crappywebsite.net

Your computer would then think “crappywebsite.net” is located at 127.0.0.1, which is actually your own computer.
Alternately, you could point it to a different IP address, like this:
64.233.167.99   crappywebsite.net

In this case, if someone put crappywebsite.net in the web browser in that computer, they would actually end up at google.

To find an IP address for most sites, you can simply go to start, run, type in cmd (or command in windows 95/98), and click ok. You will then be at a DOS prompt, also known as a command prompt. From the command prompt type the following line:

ping blockedurl.com

substituting blockedurl.com with the correct name of the website you wanted to find the IP address for. You should see something like the following:

C:\>ping blockedurl.com

Pinging blockedurl.com [64.140.103.20] with 32 bytes of d

Reply from 64.140.103.20: bytes=32 time<1ms TTL=63
Reply from 64.140.103.20: bytes=32 time<1ms TTL=63
Reply from 64.140.103.20: bytes=32 time<1ms TTL=63
Reply from 64.140.103.20: bytes=32 time<1ms TTL=63

Ping statistics for 64.140.103.20:
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>

The IP address for blockedurl.com in this case is 64.140.103.20

To exit the command prompt, type “exit”, and hit enter on the keyboard.

Keep in mind this is very easy for your kids or employees to change, if they know what they’re doing, and that there are always ways around things, but this is often a good inexpensive way to prevent people from going places you’d rather them not go to.

[Home] [Content Filters] [Antivirus] [Easy things] [Free Tools]