Firefox - How to block a specific site?
Graham Todd
grahamtodd2 at googlemail.com
Sat Jan 23 09:37:17 UTC 2010
On Fri, 22 Jan 2010 22:03:06 -0700
ANDY <sirald66 at gmail.com> uttered these words:
> UBUNTU 9.10
> FIREFOX 3.5.7
>
> Using Firefox or /etc/hosts, I want to block/redirect www.FoxNews.com.
>
> How should I do that?
>
>
> ANDY - Salt Lake, UT
Short answer:
make sure you fire up your text editor in root mode, then
open /etc/hosts in the text editor. Place an extra line *at the bottom*
of all your text as follows:
127.0.0.1 www.FoxNews.com
LONG ANSWER:
When you call a URL such as www.Flickr.com, your computer checks
your /etc/hosts file to find the IP it should look up for that URL;
if there's no Ip listed, your computer gets the IP no from your internet
service providers DNS servers, then connects you to the IP address, not
the URL.
By convention, the IP address of your computer is 127.0.0.1, so if you
list the relevant URL against the IP address of your computer, it will
try to find that URL on your computer, find its directed towards
127.0.0.1 with which it can't connect as that's your computer, and the
website is not on your computer.
Now this is a handy way of blocking sites with which there may be
problems or content you do not want, and there is a text file regularly
updated which you can get from:
http://www.mvps.org/winhelp2002/
You have to remember to copy and paste the list *UNDERNEATH* the text
already in /etc/hosts (don't delete existing text). There is one line
duplicated which is:
127.0.0.1 localhost
so delete that in the pasted section or comment it out (place hash
symbols ## in front), which will negate it, but since you already have
it listed, that's OK.
The upshot of this is that if you include in your /etc/hosts list:
127.0.0.1 www.FoxNews.com
the computer will try to find that webpage on your computer, be
unsuccessful, and not connect.
HTH
--
Graham Todd
More information about the ubuntu-users
mailing list