(Un)blocking & Redirecting Access to Websites

Tue, Jan 13, 2009, by Master Kenth

Security

Are you a parent, who wants to block access to offensive sites for you children? Well, there are a few ways. I will tell you some, in a user friendly way.

There is a certain file (on Windows computers that is), that will alter the input of your URL (the websites address), to go to another URL. I will try to make this guide user friendly, as for as far as I know, there is a lack of those interested enough to understand all the computer terms some use.

I will cover two options, one being the ability to either block, or redirect URL of ONE computer. The other one, probably known by many, is to block sites via your router (if you have one). This can be done from any computer connected to the router.

1: Block by computer, and for that computer only.

On most Windows computers, there is a file. To locate the file, go to c:/Windows/System32/Drivers/etc. For those of you who maybe have a hard time doing this, navigate to “this computer” (mostly, there is a desktop icon, otherwise, it will most likely be on the start menu). From there just double click the folder with the same name as the ones above to get there. Now hopefully, you can navigate to the folder called “etc”. You should see a file named “hosts”. double click it. You should get promted by a dialog asking what to do with it, as no program currently knows. Just choose the one saying opening with a program, and in the new dialog, choose notepad, wordpad, or any other text editor.

You will see a fair amount of text. If you can see at the bottom, it says “127.0.0.1  localhost”. This is an example of what we will be doing. Now, if you just want to block a site, says YouTube (maybe your kid watches to much movies), start a new row of text. Enter anything, but for the sake of compatibility, just enter “127.0.0.1″. Now put some spacing in between, the amount doesn’t matter but make it one space, or press TAB. Now enter the website you want to block. Some sites allows to leave out the “WWW” prefix, so make sure to write to rows, one with the website and the “www.” prefix, and one without.

Now, here is an example:

127.0.0.1 youtube.com
127.0.0.1 WWW.youtube.com

Capitalizing isn’t important. Now access to youtube.com, or www.youtube.com should be blocked, displaying the error screen in your browser.

If your just out to mess with someone, or teach them a lesson, I will guide you through the process of redirecting an URL. Otherwise, just skip to the next paragraph.
Redirecting URL work in the same way, but instead of “127.0.0.1″, we need to put the IP of the site where are going to redirect to. URL to IP processing, or DNS to IP, will pinpoint the IP. I found a good service here: http://baremetal.com/cgi-bin/dnsip. Simple enter the URL of the website (with suffix like “.com” and “.org”), and you will get the IP. Now back the the “hosts” file. Enter the IP of the website you want to redirect to, followed by a spacing, and then the URL of the website which will be entered by the user. For example, this line will make your browser go to “google.com” every time you enter “youtube.com”:

74.125.45.100 youtube.com

It might still say “youtube.com” in the adress bar, but your on Google!

2: Block by router and every computer connected to the same network.

This might be a little different, as it differs from router to router, but in general, every router setup should include the ability to block website access. Accessing the router setup can be done from any computer hooked up to the same network. Just open up your browser of choice, and enter “192.168.1.1″ in the address field. You should get promted by a login pop-up. By default, it should be “admin” as login and “password” as password. This also varies from router to router, and someone might even have changed it. Assuming you logged in successfully, there should be some kind of link to website blocking. For the following example, I’m going to use a NETGEAR WGR614V9 router.

Once logged in, there should be a task bar to the left. Under the option of “content filtering” there is “block sites” (there is also “block services” to deny certain programs and ports access). There is now a little dialog box, here you can simply enter a website URL or even just a keyword.

Now, hope this guide has helped you block some sites! Happy blocking!

0
Liked it

1 Comments For This Post

  1. Hmmm Says:

    this all would be great, if you were able to save host file. host is windows file and will deny you save after changes have been made…

Leave a Reply