Categories
College-Life

Blocking Site using Hosts File or Redirecting to Random Site

Nice little trick to block your sister, friend, girlfriend, dad, little brother (it does wonders if you block their favorite gaming sites, and watch them go nuts 🙂 ) from visiting a site and redirecting to some random website, or playing a nice prank on some non-computer savvy person.

For Xp Windows users:

Go to windows/system32/drivers/etc open the hosts file in it, with wordpad or notepad.

Add an entry at the bottom where it says :

127.0.0.1 localhost

66.102.9.147 www.myspace.com

What it will do is redirect the person from myspace website to ip “66.102.9.147” which is the ip for google.com , you can do this trick to any sites you want just keep adding them in the next successive lines.

For example add:

66.102.9.147 www.yahoo.com

And now yahoo will open as google.com . It can be used a prank also, but I wouldn’t suggest it doing to your bosses computer, cause you will end up fired. And this can only be done if you are system administrator.

If you wish to redirect them to any other site of your liking go to

http://www.hcidata.co.uk/host2ip.htm enter the site you want them to be redirected to it will tell you the sites ip, enter that ip instead of “66.102.9.147” and you are set. Or if you do not want them to be redirected replace “66.102.9.147” with 127.0.0.1

Attached below is the example of how your final hosts file should look like :

# Copyright (c) 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#’ symbol.

#

# 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

66.102.9.147 www.myspace.com

Enjoy and happy browsing.

By Bloggy Admin

Interested in Computer Technology and Infrastructure Design

12 replies on “Blocking Site using Hosts File or Redirecting to Random Site”

Hello, just wanted you to know I have added you to my bookmarks because of your beautiful blog layout (LOL). But honestly, I think your site has one of the cleanest design I’ve came across. It really makes your blog post easier to read.

Well not really, .html and redirection is server sided, so unless you got an apache running, and a browser open to view it, i doubt redirection will work.

Is there any way to redirect to an html file that is on your computer…

Not online???

thank you very much

Hi,
You are not suppose to delete HOSTS file at all, tell me what you did, your hosts file should simply just show
# Copyright (c) 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#’ symbol.

#

# 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

LoL , sorry did not know it would ignite a feud between 2 brothers !!

Well lee he probably found a way around ? I would suggest firewalling that site if you got custom firewall other than stupid xp firewall 🙂

Your a genuis sumeet , it works excellent now my brother won’t get watch his cartoons.

Thank you, thank you, thank you

Leave a Reply

Your email address will not be published. Required fields are marked *