FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How To Block Websties Without Software, block websites





ankur209
Steps:

1] Browse C:\WINDOWS\system32\drivers\etc
...2] Find the file named "HOSTS"
3] Open it in notepad
4] Under "127.0.0.1 localhost" Add 127.0.0.2 www.sitenameyouwantblocked.com , and that site will no longer be accessable.
5] Done!

-So-

127.0.0.1 localhost
127.0.0.2 www.blockedsite.com

-->www.blockedsite.com is now unaccessable<--

For every site after that you want to add, just add "1" to the last number in the internal ip (127.0.0.2) and then the addy like before.

IE: 127.0.0.3 www.blablabla.com
127.0.0.4 www.blablabla.com
127.0.0.5 www.blablabla.com

etc
rickylau
It doesn't matter whether the IP is 127.0.0.1 or 127.0.0.something. Just that if you have a local web server then those hosts will be directed to the local web server then.

I think it can be used as temporal measure, it is not too practical. I prefer OpenDNS which you can block a group of hosts for the whole network with few clicks on its web interface, and it doesn't require installation too (if you've got a static IP).
militarist
you can use internet explorer too and there is some firefox addons for this job.
FunDa
rickylau wrote:
It doesn't matter whether the IP is 127.0.0.1 or 127.0.0.something. Just that if you have a local web server then those hosts will be directed to the local web server then.

I think it can be used as temporal measure, it is not too practical. I prefer OpenDNS which you can block a group of hosts for the whole network with few clicks on its web interface, and it doesn't require installation too (if you've got a static IP).



I think you should read through the following explanation


Quote:
From RFC 3330:

0.0.0.0/8 - Addresses in this block refer to source hosts on "this"
network. Address 0.0.0.0/32 may be used as a source address for this
host on this network; other addresses within 0.0.0.0/8 may be used to
refer to specified hosts on this network [RFC1700, page 4].

0.0.0.0 represents "any address". Binding a listening socket to 0.0.0.0
tells the OS to accept connections on any IP address for which the host
has bound network adapters. Say your host has 2 network adapters and
each has its own IP address. You could bind a socket to either network
adapter and connections are accepted only on that adapter for that IP
address. However, if you bind a socket to 0.0.0.0 (INADDR_ANY in
Winsock) than it binds to both adapters.

The result is that the traffic (that you are trying block or nullify)
has to go out through the external interface of your network adapter to
only come back in (or possibly to another host in your network). I
don't want to waste any resources, especially any that is exposed
outside my host, on content that I'm trying to nullify.

From that same RFC:

127.0.0.0/8 - This block is assigned for use as the Internet host
loopback address. A datagram sent by a higher level protocol to an
address anywhere within this block should loop back inside the host.
This is ordinarily implemented using only 127.0.0.1/32 for loopback,
but no addresses within this block should ever appear on any network
anywhere [RFC1700, page 5].

Yep, that's what I want. I don't want any traffic going outside my host
(i.e., exposed on the external interface of my network adapter) when I
am intending to block that content. There is no reason to spew any
traffic outside my network adapter when blocking that content.

I want to bottle up the block within my host without generating any
traffic outside my network adapter. From what I read, 0.0.0/8 won't do
that but 127.0.0/8 will. And to further that, it appears the web
browser aborts quicker when I reference the 127.0.0.0 diagnostic network
than when I use 127.0.0.1 host in the hosts file.

I suspect 127.0.0.1 got used because it designates an internal-only host
(localhost). The hosts file, after all, is about identifying hosts, not
networks. So using 127.0.0.1 for the host may simply be by convention
when used within the hosts file. Also, back then, workstations that
used the hosts file (a historical artifact before DNS showed up) were
NOT running any servers that were listening on that same host for
connections.

Many local proxies will use 127.0.0.1, like some older anti-virus
software, anti-spam proxies, filter proxies, or just about any process
that opens a socket on which it listens. You can run programs on your
host that are listening for connections and I don't want any possibility
of wasting resources for connections to them when I am blocking content
in web pages.

The blocked content will be likely using port 80 for the target server.
It is possible that I have a web server running on my host (in fact, I
recall a minimal web server that did nothing but work with the hosts
file to present a placeholder in the web page so you could see the
block). It is possible the URL to the blocked content specifies a
non-standard port number which could match the listening port for a
proxy or server process that I have running on my host. Why waste the
resources to create a socket when my intent is to block that content
(actually to nullify it as though it was never existed)?

Say I'm running SpamPal (I don't anymore but did once). How do e-mail
apps use it? By specifying 127.0.0.1 as the IP address for the
"server". Say I have SpamPal listen on port 8110. Well, that's not the
default of port 80 for HTTP connects but then the URLs for the blocked
content can specify a different port. They could even specify port
8110. The hosts file replaces the IP name with the IP address
(127.0.0.1) but not the port number so now the blocked content is trying
to connect to SpamPal at 127.0.0.1 listening on port 8110. Not likely
to happen but why leave open a window of opportunity?

127.0.0.1 is used by LOTS of network-facing software running locally on
your host. Just because you don't run a web browser now doesn't mean
you might not want to run one later (or some application that acts like
a web server, especially those that employ a web-centric UI). Using
127.0.0.1 for blocking content doesn't seem a good choice since it is
the same IP address used by many software programs listening for
connections on your own host.

That I can use 127.0.0.0 doesn't mean that's how it should be done.
That it works doesn't mean I should use it. I can use the rounded tip
of a butter knife on a screw, too, but it's not the proper tool. There
must be some reason why 127.0.0.0 didn't get used for *blocking* content
(and without generating any traffic outside the network adapter as would
occur when using 0.0.0.0).
Related topics
A "small" list of free apps
problem with my computer
Antivirus Freeware
Do you think Website or Software is better?
Computer jokes (funny!)
AJAX web coding
The greatest ideas of history
Imagine a world without any Microsoft (in all seriousness)
Is there any way to block script with css?
problem due to AutoRun.IRCBot.DZ worm
Internet connectivity problems
Woot! 989 emails deleted, and back on track!
I Hate my schools internet block!
Stop Online Piracy Act (SOPA)
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.