How To Use The Hosts File
By admin | January 19, 2010
What is the hosts file?
The hosts file is a simple text file that is located (for
NT/2000/XP) in the %systemroot%system32driversetc directory
where %systemroot% is a wildcard that points to the location of your Windows directory
(e.g. C:Windows). For Windows 95/98/ME it’s in the main %systemroot%
directory.
It can be edited using Notepad. Be sure that it is
saved WITHOUT a file extension of any kind, including type txt.
If you make changes and then save the changes, browse to the
file through Windows Explorer or My Computer to make sure that
the file reads as hosts with no extension. Note: Be sure to set
Windows to show file extensions.
Think of the hosts file as an address book for
web sites. Windows will look in the hosts file BEFORE attempting
to locate a web site by using the Internet domain name servers
(DNS).
How can we use the hosts file to trick bad sites?
The idea here is to give a bad website the wrong address so that any attempt to
direct our browser to that address will fail. We do this by telling Windows that
the website exists on our computer. Since it does not, the website will fail to
load.
If we want to block the browser from going to
a particular web site, e.g. badsite.com, we can simply add an entry as follows:
127.0.0.1 badsite.com
The address 127.0.0.1 is the
loopback address of OUR computer, therefore the page will not be found
and the lookup will fail.
Automate the procedure….
Spybot S&D, Spy Sweeper and many other
anti-spyware programs contain their own list of malware sites
that can be added to your hosts file from within the program.
For example, Spybot – from the menu, Mode/Advanced/Tools/Hosts file
- click on the Add
Spybot-S&D hosts lists.
More hosts file info….
Do a search of the Internet for “ad
blocking hosts file” and you will locate many lists containing
bad sites that can simply be copied and pasted into your hosts
file. Click on
Easy hosts file management….
Download the Hostess utility from
Ray Marron’s Hostess page.
Hostess is a free utility for maintaining your Hosts file.
Cons…..
NOTE: If you use this method be prepared to see
“Action cancelled” or an x where otherwise you might
see an ad or image. This is to be expected since the website
that the ad or image points to has been blocked via the hosts
file.
Brian Alaway Consulting
Tampa Computer Repair
Service and Support
© 2005 BAC Group Inc., All Rights
Reserved
Topics: Articles - Technology, Hosts file - Security | No Comments »
Comments
« Why Use Strong Passwords? | Home | You Can Fight Identity Theft »
