Hello Rooey,
Based on what you described, let me walk through the second solution
in some detail. I can certainly work out one of the other solutions if
this does not completely satisfy you.
First, you need to find the host file and make a copy and name it
hosts.open which has the current contents. The hosts file should be at
C:\winnt\system32\drivers\etc\hosts
If it is not there, let me know so I can check tomorrow AM when I have
better access to a Windows 2000 machine and figure out if other
locations may apply.
Second, make a second copy (hosts.closed) that has the same
information plus lines for each of the blocked sites. The added lines
will be of the form:
127.0.0.1 www.espn.com
127.0.0.1 espn.com
and so on. For an extensive example of these added lines, check out
http://www.ecst.csuchico.edu/~atman/spam/adblock.shtml
which blocks a number of advertising sites. You may want to do this as
well; that would get rid of the annoying ads which are probably not
business related either. This page also makes a comment related to
changing proxy settings - based on what you said in your question and
clarification, that should not apply.
Third, we need a pair of simple .BAT files to open / close the access
to the network. This can be something as simple as
COPY C:\winnt\system32\drivers\etc\hosts.closed
C:\winnt\system32\drivers\etc\hosts
for the close access file and
COPY C:\winnt\system32\drivers\etc\hosts.open
C:\winnt\system32\drivers\etc\hosts
for the open access file. [those should both be one line BAT files]
Let's call them CINET.BAT and OINET.BAT for the close and open files
respectively. You can create them with notepad or any other text
editor.
Next, we need to test this. Open a command window and run the
CINET.BAT file. It should run without error (or any messages). Bring
up the web browser and try to access espn.com and confirm that you get
blocked. Now run the OINET.BAT file. Again - no messages or errors are
expected. Try to access espn.com and confirm that it works. If it is a
work day - run CINET.BAT one more time to leave access blocked. If
these both work OK - you are set for the final step to schedule the
scripts to run each work day. If not - be sure to use a clarification
request so I can walk through fixing the problem.
Finally, we need to schedule the close file to activate each day at
9am and the open file to activate at 5pm each day. Using
http://www.jsiinc.com/subg/tip3200/rh3215.htm
as a guide, you can use a pair of AT commands to schedule the tasks.
This assumes the task scheduler is already set up - if not, let me
know and I can walk you through that as well.
For example, if those two BAT files are in the same directory as the
hosts file, open up a command window and enter commands like:
AT 09:00 /every:M,Tu,W,Th,F C:\winnt\system32\drivers\etc\CINET.BAT
AT 17:00 /every:M,Tu,W,Th,F C:\winnt\system32\drivers\etc\OINET.BAT
to do enable swap. You may be able to set this up using the GUI
inteface, but according to the page above - that may not work so I'd
try the above first. I also have this set so it works every work day
(not weekends) at the specified time. I assume you don't care about
weekends - if you do, add Sa and Su to the list of days.
At this point you should be set up to block the sites you don't want
accessed during the day. Note that you can update hosts.closed at any
time and the changes will take effect right away.
To find this information, I searched using phrases such as:
windows 2000 location hosts file
schedule job windows 2000
block web access windows 2000
blacklist web windows 2000
The last couple provide references to a number of sites with
commercial web site blocking software. They would give you a more
capable / polished solution. For example:
http://www.codework.com/bcontrol/product.html
http://www.nnstore.com/products/netnanny5/
there are a number of others, but I would make sure they include a
"blacklist" capability instead of (or in addition) to the general
category blocking.
Good luck with your business and don't hesitate to ask for
clarification if this does not work and/or is unclear how to do.
--Maniac |
Clarification of Answer by
maniac-ga
on
10 Sep 2003 21:22 PDT
Hello Rooey,
There are at least two ways to do this.
[1] After you check it out one one machine and have all the files, go
to each machine (as an administrator), copy the .BAT and hosts files
and then do the AT command on each one to set up the enable / disable.
[2] IF you have shared folders enabled (in particular the C drive)
where the administrator on the server can mount / copy files. You
could do the file copying from the server using the shared folders.
However, I would still expect you to have to set up the scheduled
tasks on each machine.
There are some variations on that. For example, there are remote
control programs that allow you to control another machine from a
server - you could use that to avoid having to sit in front of each
machine.
Another alternative that may be feasible - IF all the local computers
use the server as the Domain Name Server (DNS).
- Update the file on the server using the original method.
- Check to see if the local computer is now blocked. If so - you are
set by just updating the server, all local computers are blocked. If
not - try restarting the DNS server.
In either case, the next time the local computer asks for the IP
address of one of the blocked hosts, they would get the local address
(and thus get blocked). In this way - you only have one machine to
apply the updates to.
One other thing that comes to mind. This method (of changing the hosts
file) does not completely block access from a site like espn.com. IF
the user knew the IP address number of www.espn.com, they could type
in the number to attempt to get through. It may work - it may not, it
depends on how the web site is coded up. That method would require a
bit of arcane knowledge however, and is not likely something your
users will know about.
--Maniac
|