[Tutor] internet access

Alan Gauld alan.gauld at btinternet.com
Thu Oct 11 12:19:06 CEST 2007

"Kirk Vander Meulen" <kvander11 at gmail.com> wrote

> I'd like to write a script that limits internet access to certain 
> hours of
> the day.  This seems like it should be simple but I'm not very 
> experienced

Its actually not that simple because its fundamentally going against
the design of the computer. Modern computers and operating systems
are designed to allow multiple users to perform multiple tasks
'simultaneously' without getting in each others way. Thus it's 
easy for an application to change its own access but much more
difficult for an application to change a user's access and even more
difficult for one user's application to change access for every user
or for the machine as a whole. It's designed to be that way.

Now there is one loophole, which is the administrators account
(which is root on Linux/MacOS or nearly every user on XP!
I dunno if Vista has closed this gaping Windows security hole or

The administrator's account should not be used for day to day
usaage (XP defaults not withstanding) but for administewring all
other users and the machine itself. Thus to do what you need the
application would need to run as administrator and would need to
tweak the operating system networking setup. Neither of these are
particularly trivial in a well set up machine (and for good reason).

So the question is, do you want to lock down a single application?
Or a single user? Or the whole computer? And which OS are you


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list