Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I manipulate the Windows Hosts file so that it only allows certain websites?

I'm trying to restrict employee access to only the websites we approve. I figured the best way to do that is with a simple script. The script would be run when an operator logs in to a station, and manipulate the hosts file so that only certain sites can be reached. In other words, if the site isn't on the list, they can't access it.

Any ideas on how to code the hosts file to accomplish this? Thanks!

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    That's not how the hosts file works. If the site *is* on the list, and pointed to 127.0.0.1, the computer can't access it. It's a blacklist, not a whitelist.

    To do what you want to do, the easiest way is with a proxy server. Something like http://whitetrash.sourceforge.net/ is a good starting point, but someone would have to add the AD (active directory) interface (to have a different whitelist based on the login of the computer accessing the internet). That's not cheap programming. (Maybe you could interest the author in adding it.) It also would probably require an additional computer (unless you're already running Linux, not Windows).

  • 1 decade ago

    Try this website

    http://www.opendns.com/

    free, If you subscribe for a fee, you get more. I like it a lot

Still have questions? Get your answers by asking now.