|
Answer» Hello to all,
Is there any way I can block some of the websites by using any batch file or script. I want to restrict some of the websites. I'm using Windows Xp Service PACK 2 & my IE version is 6.0. I'm not joined to any domain. Or is there is any other way I can restrict the some of the websites so that users can't be allowed to use them. Have a Nice Day, Bye.
Find your hosts file, if you use XP.. save the following as hosts.cmd
@ECHO OFF @Set H=C:\windows\system32\drivers\etc\hosts @ECHO %1 %2>>%H% @CLS
and at the line, the SYNTAX would be hosts.cmd 0.0.0.0 www.google.com
0.0.0.0 is the default for the localhost, its the equivilant of 127.0.0.1 So you could also type hosts.cmd 127.0.0.1 www.google.com
your hosts file, has the ability to block any remote host on your machine , when you open it in a NOTEPAD, you will see probably something like this..
# be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, COMMENTS (such as these) may be INSERTED on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 0.0.0.0 free-viruscan.com 0.0.0.0 www.free-viruscan.com
0.0.0.0 dpnet.com 0.0.0.0 www.dpnet.com 0.0.0.0 gal.dpnet.com 0.0.0.0 www.gal.dpnet.com 0.0.0.0 deploy.akamaitechnologies.com 0.0.0.0 akamaitechnologies.com 0.0.0.0 a96-6-120-43.deploy.akamaitechnologies.com 0.0.0.0 www.live.com 0.0.0.0 www.google.com
|