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

Re: Limiting internet access by time



On Fri 05 Aug 2016 at 15:03:47 (+0100), Brian wrote:
> On Fri 05 Aug 2016 at 12:00:28 +0100, Lisi Reisz wrote:
> 
> > On Friday 05 August 2016 11:40:28 Brian wrote:
> > >
> > > How essential is this? cron could
> > >
> > >   ip route add default via <gateway_IP>
> > >
> > > at specific times between 9pm and 9am and then remove the default route.
> > > If the machine isn't up all the time it seems unnecessary to me.
> > 
> > Perhaps he wants to stop his children/grandchildren/house guests surfing the 
> > web at 3:00 am. 
> 
> Possibly.
> 
> Let us look at this from a different angle. If the machine is given a
> fixed address it negates the need for dhcp checking, If, additionally,
> no gateway to the internet is specified there would be no access to the
> internet at any time.
> 
> For an always-on machine cron jobs could switch routing at 9am and 9pm.
> If the machine was rebooted after 9pm there would be no internet. A
> reboot after 9am presents a problem. This could be solved by having cron
> check every five minutes between 9am and 9pm and providing a gateway to
> the internet.

No need to wait for five minutes; cron has a @reboot parameter, eg,

@reboot /sbin/kbdrate -r 8 -d 500 -s

slows down the keyboard repeat key so that Cindy-Sue can login more easily.

Cheers,
David.


Reply to: