[K12OSN] OT: Limit Network Access by time

Jeff Kinz jkinz at kinz.org
Wed Feb 25 17:28:01 UTC 2004


On Wed, Feb 25, 2004 at 03:57:17PM -0600, Jim Kronebusch wrote:
> I actually found this at IPCop's website:
> ----------------------------------------------------------
> Can I disable the internet connection from 11pm to 6am? 
> Add a cron job to do this. The following will stop all internet
> interface traffic from 11pm to 6 am. You can either use the entire
> ruleset, or eliminate the ones you don't use, ie, if you don't have a
> modem, leave out the modem lines, and vice versa. Using them all will
> not hurt anything. 
> 
> 0 23 * * * /sbin/ipchains -I ethout 1 -i eth1 -j DENY
> 0 23 * * * /sbin/ipchains -I ethin 1 -i eth1 -j DENY
> 0 23 * * * /sbin/ipchains -I mdmout 1 -i ppp0 -j DENY
> 0 23 * * * /sbin/ipchains -I mdmin 1 -i ppp0 -j DENY
> 
> 
> 0 6 * * * /sbin/ipchains -D ethout 1
> 0 6 * * * /sbin/ipchains -D ethin 1
> 0 6 * * * /sbin/ipchains -D mdmout 1
> 0 6 * * * /sbin/ipchains -D mdmin 1
> 
> ----------------------------------------------------------
> 
> Would I just add the first two lines of these sections to crontab?  I
> will give it a shot.  I was thinking I could put the dorm staff on the
> Orange network, and the students on the Green network, then just disable
> the green.  Opinions....


It looks very promising.  I didn't realize that IpCop used ipchains as
iptables has generally replaced it.  But anywho...

As long as your interfaces are named the same as the way they are named
in these samples it should work.  I do like your idea about using
separate networks for students and staff.  that will let your staff come
to class bleary eyed if they so choose... :-)

-- 
Jeff Kinz, Open-PC, Emergent Research,  Hudson, MA.  
"jkinz at kinz.org" is copyright 2003.  
Use is restricted. Any use is an acceptance of the offer at
http://www.kinz.org/policy.html.





More information about the K12OSN mailing list