Guide RSS: News Maker

Blocking websites using host file in Windows

Posted on May 14, 2009 in: Guide 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet) Loading ... Loading ...
Host File - Website Blacklisting

Host File - Website Blacklisting

What is a host file ?

The host file is a computer file which maps hostnames to IP address of web server. Unlike DNS networks it can be controlled by the system administrator.The host file has no extension but can be accessed using normal text editors like notepad.

Importance of host file

The host file can be used to block websites.Usually the host file is being used by malicious programs to redirect visitors of legitimate sites to spyware sites. So even if you type the correct url in the address bar if your host file was modified then your account information could be compromised.

Location of host file

Windows NT/2000/XP/2003/Vista/7:

%SystemRoot%\system32\drivers\etc\ is the default location.

Windows 95/98/Me

%WinDir%\

Editing a host file

For windows versions older tha Vista you can edit it just by opening it with notepad.But starting with Vista , if UAC (User Account Control) is enabled, then use this guide.

Blocking Websites/Ads:

You can make use of host files to block ads,third party counters etc.

Ex: 127.0.0.1 ad.doubleclick.net adding this entry to the host file blocks files from doubleclick server.

For more examples visit : http://www.mvps.org/winhelp2002/hosts.txt

Famous Security Vulnerabilities

The widespread worm Mydoom.B blocked users from visiting sites regarding computer security and antivirus software and also affected users’ ability to access the Windows Update website.

Conclusion

But you should not depend upon host files to block websites .Here i will explain how it could be found out easily by a user of your computer.

The site has been blacklisted using host file

Your user does a simple trace route and founds out.

Trace Route

Trace Route

So I recommend you to use appropriate software for blocking websites or give them normal user accounts so that modification of host file is impossible.To protect your host file make it Read only.Thus using host file we can block websites without any software installation.

5 Responses to “Blocking websites using host file in Windows”

  1. Taylor says:

    Got a problem… I am using Windows 7, and the host file is still there, however, “access denied”. I am an administrator, however, i am having issues with this… any help would be greatly appreciated. Thx

    Thumb up 1 Thumb down 0

    • Ajay says:

      Type ‘notepad’ in start menu search area. Right click on the result and choose ‘Run as Administrator’ and then browser Windows -> System 32 -> etc -> drivers -> hosts file and open it.

      Thumb up 0 Thumb down 0

    • Martin says:

      Right click the hosts file, click properties, go to the security tab, click on your username, click edit properties. Click to grant yourself full control. Click apply and you can now save the file.

      Thumb up 0 Thumb down 0

  2. Martin says:

    I see you covered a lot of information on blocking sites with the host file. You even discussed making sure they don’t have administrator rights to alter the host file themselves. For children I would go even one step further and suggest you also block access to most or all search engines like google, yahoo and bing. That why they can’t go out and search how to unblock access.

    I’ve also made a point and click instructional video on completing the steps above. If you are not great with computers and would prefer to watch the mouse movements and commands then go ahead and watch my video here. I’ll be adding a more advanced version soon.

    Thanks
    Martin

    Thumb up 0 Thumb down 0

Leave a Reply

Connect with Facebook


Tags: ,

About Ajay

On this Blog you can find the latest tech updates, tips and tricks, latest security threats, software/hardware trouble shooting and much more....

Copyright © 2007-2010 Jambai. - Some Rights Reserved | Disclosure Policy | Privacy Policy | Posting Policy