Jump to content
Microsoft Windows Bulletin Board

using bat to block websites?


Recommended Posts

Guest Kim K
Posted

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

Guest Florian Frommherz [MVP]
Posted

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.

Guest Michael Bednarek
Posted

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"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...