Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Computer Support > Blocking a Website Using the Hosts File How do I do It?

Reply
Thread Tools

Blocking a Website Using the Hosts File How do I do It?

 
 
Heidi Manway
Guest
Posts: n/a
 
      12-28-2006
Hi how do I block a Website with a HOSTS FILE?

Is it possible.

Regards,

Heidi

 
Reply With Quote
 
 
 
 
beenthere
Guest
Posts: n/a
 
      12-28-2006

"Heidi Manway" <> wrote in message
news: oups.com...
> Hi how do I block a Website with a HOSTS FILE?
>
> Is it possible.
>

Hi Heidi
If you go to Start\Search, and search for hosts, you`ll find a
file in Windows/system32/drivers/etc.
Open it with a text editor, and you`ll see the format used.
Just add your own entry in that fashion.
ie.
127.0.0.1 the name of who you want to block.

bw..OJ


 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      12-28-2006
Heidi Manway wrote:
> Hi how do I block a Website with a HOSTS FILE?
>
> Is it possible.
>
> Regards,
>
> Heidi
>


You do it by putting an entry in to the Host file that uses the Loop
Back IP of 127.0.0.1, which points back to your computer.

As an example, if you put in an entry for www.microsoft.com and an IP of
127.0.0.1 in the Host file, that will stop anyone using a browser from
accessing the site if they give www.microsoft.com in the address bar for
the browser or if it was a URL in an email pointing to www.microsoft.com.

The Host file is actually a Domain Name Resolution file. Anytime you
give an url like www.whatever.com in the browser, an url in an email or
url in a body of a Web Page is accessed, the IP to the Web site must be
looked up. In all case, there is a Domain Name Server on the network
(your ISP's network) that your computer accesses to resolve
www.whatever.com to the IP of the site so that your computer with the
browser can access the site.

If there is a Host file present on the computer, the O/S, Windows XP as
an example, will look in the Host file first before it goes to the ISP's
DNS to resolve the www.whatever.com to an IP.

If www.whatever.com is present in the Host file and is pointing to the
127.0.0.0 Loop Back IP pointing back to your machine, then the access is
blocked to the site.

However, if someone wants to access www.whatever.com, all the have to do
is give the real IP to the site in the browser not the www.whatever.com
and they will be able to access the site, because the IP doesn't have to
be looked up via the Host file or the IPS's DNS on the ISP's network.

The Host file used in blocking access to a site is a limited means of
blocking access to a site. Also, malware seeks out a Host file and
circumvents and defeats the Host file in site blocking, if the malware
hits the machine and is executed.

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      12-28-2006
In 24hoursupport.helpdesk, beenthere wrote:

> "Heidi Manway" <> wrote:
>> Hi how do I block a Website with a HOSTS FILE?
>>
>> Is it possible.
>>

> Hi Heidi
> If you go to Start\Search, and search for hosts, you`ll find a
> file in Windows/system32/drivers/etc.
> Open it with a text editor, and you`ll see the format used.
> Just add your own entry in that fashion.
> ie.
> 127.0.0.1 the name of who you want to block.


Remember, use only the domain name (and/or subdomain name), not the
complete URL (no "http://"). Ex:

127.0.0.1 ad.doubleclick.net
127.0.0.1 ad.doubleclick.com

Here's a copy of mine:
http://k75s.home.att.net/hostsfile.txt

--
-bts
-Motorcycles defy gravity; cars just suck
 
Reply With Quote
 
Keme
Guest
Posts: n/a
 
      12-28-2006
Heidi Manway skrev:
> Hi how do I block a Website with a HOSTS FILE?
>
> Is it possible.
>
> Regards,
>
> Heidi
>


You can not block the website as such. A hosts file will control
DNS-to-IP translation on the computer where it resides, and will "block"
that computer from accessing the specified site. It's done by adding a
line in the hosts file, with the IP-address to redirect to followed by
the domain name to be redirected. To block a connection, you can simply
redirect to localhost (unless you are running a web service on you
workstation). Add the following line to your hosts file:

127.0.0.1 blocked.site.net

The hosts file must be named "hosts" (or ".hosts" on linux) and be in
the correct folder:
Windows XP = C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K = C:\WINNT\SYSTEM32\DRIVERS\ETC
Win 98/ME = C:\WINDOWS
linux/BSD/etc. = /etc

Note that the hosts file will not block communication, just intercept
DNS-IP translation. If the IP address is written in the link/address
field, you'll still get through.
 
Reply With Quote
 
why?
Guest
Posts: n/a
 
      12-28-2006

On 28 Dec 2006 04:41:58 -0800, Heidi Manway wrote:

>Hi how do I block a Website with a HOSTS FILE?


www.google.com

Read this,
http://www.mvps.org/winhelp2002/hosts.htm
or
http://accs-net.com/hosts/what_is_hosts.html
http://www.techworld.com/security/fe...agtype=samecat

<snip>

Me
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
hosts can only ping other hosts after router has pinged them? spec Cisco 7 06-05-2006 08:06 AM
UNIX Script To Remove Hosts from Hosts file Bla Perl Misc 1 04-10-2005 04:14 PM
UNIX Script To Remove Hosts from Hosts file Bla Perl 0 04-08-2005 12:46 AM
stealth-blocking, isp blocking website Dhruv Computer Security 9 01-25-2005 05:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57