[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[K12OSN] Re: Limit Network Access by time



another way is to add an iptables rule blocking
the red interface(external) and toggle it
on/off using crontab.
--
#crontab -e (on one line)
0 22 * * * /sbin/iptables -A CUSTOMINPUT -i $RED_DEV -s 192.168.1.0 -j
REJECT
0 6 * * *  /sbin/iptables -D CUSTOMINPUT -i $RED_DEV -s 192.168.1.0 -j
REJECT

--
or Block everything except the above network by replacing REJECT with
ACCEPT and adding -A CUSTOMINPUT -i $RED_DEV -j REJECT , first.
if your directors are on the same network use a subnet mask to limit the
ip's to the addresses you want to block.

http://www.troubleshooters.com/lpm/200305/200305.htm#_Blocking_a_Subnet
http://www.mkssoftware.com/docs/man1/crontab.1.asp

robert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]