[K12OSN] OT: Limit Network Access by time

Jeff Kinz jkinz at kinz.org
Wed Feb 25 16:13:03 UTC 2004


On Wed, Feb 25, 2004 at 03:03:26PM -0600, Jim Kronebusch wrote:
> We have a dorm on campus here that has full internet access into rooms
> 24 hours a day.  We had problems with students accessing pornographic
> sites (this is a high school dorm) so I built a IPCop Router with
> Dansguardian to accomplish content filtering.  Now they are having
> problems with students surfing the net all night and being too tired for
> class so they want to limit access to the internet by time of day
> (Please, no political discussion about why).  Does anyone know a way to
> accomplish this with the existing setup?  I would like to totally
> disable network access after say 10:00PM and say renable at 6:00AM.  It
> is not needed but it would also be awesome to allow the 6 dorm directors
> access 24 hours a day based off of their IP or MAC address (somewhat of
> an exclusion list).


Run a cron job at 10 Pm and 6PM
In the script modify your iptables config to disable port 80 conenctions
for certain rainges of local IP addresses

Add stuff like this to your iptables :
(Lose the #'s)



# iptables -A FORWARD  -s 217.81.138.0/24 -j LOG --log-prefix "No net for students"
# iptables -A FORWARD  -s 217.81.138.0/24 -j DROP


where 217.81.138 is the prefis to the students Subnet


-- 
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