using bat to block websites?

K

Kim K

Is it possible for me to include in a logon.bat websites that I want to block
access to? If so can someone please send me a script on how I would do this
so I can include this in my logon? I want to block access for students to
use free email accounts in the classroom.
--
Thanks,,
Kim
 
F

Florian Frommherz [MVP]

Howdie!

Kim K schrieb:
> Is it possible for me to include in a logon.bat websites that I want to block
> access to? If so can someone please send me a script on how I would do this
> so I can include this in my logon? I want to block access for students to
> use free email accounts in the classroom.


Get yourself a proxy server. Squid is worth a look (free) - or
Microsoft's ISA Server, if you're into Active Directory integration. If
you *really* want to block access to certain websites and it is relevant
for your business workflows or whatever, you should not think about a
batch script that does this (if there even is such a thing). You should
think about a central solution like a proxy where all access to the
internet/other networks is handled instead of touching or messing around
with each client.

Just my 2 cents

cheers,

Florian
--
Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
 
M

Michael Bednarek

On Mon, 16 Jul 2007 07:32:08 -0700, Kim K wrote in
microsoft.public.security:

>Is it possible for me to include in a logon.bat websites that I want to block
>access to? If so can someone please send me a script on how I would do this
>so I can include this in my logon? I want to block access for students to
>use free email accounts in the classroom.


I agree with Florian's comments. However, strictly answering your
question, this may get you started:
ECHO 127.0.0.1 youtube.com >>%SystemRoot%\system32\drivers\etc\hosts

Note that the location of "hosts" is not fixed but specified in the
registry(1) - it could be somewhere else it's very easy for a
determined user to defeat this method.

1) HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Back
Top Bottom