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

Re: Limiting internet access by time




On Fri, 5 Aug 2016 at 20:00, Lisi Reisz <lisi.reisz@gmail.com> wrote:
On Friday 05 August 2016 11:40:28 Brian wrote:
> On Fri 05 Aug 2016 at 00:02:40 +0000, Mark Fletcher wrote:
> > On a stretch box I have, I want to allow access to the Internet between
> > the hours of 9am and 9pm and block it between 9pm and 9am. Ideally allow
> > local network access throughout but block Internet access between 9pm and
> > 9am, but I can accept total network blockage in the off times if
> > necessary.
>
> Your ideal is achievable.
>
>   ip route del default via <gateway_IP>
>
> Plus a cron job.
>
> > The machine is used as a desktop, so it is not up all the time. It might
> > be brought up before 9am, in which case it should come up blocked and
> > unblock at 9am, or it may be brought up after 9am, in which case it
> > should come up unblocked and block if it is still up at 9pm. Time
> > precision isn't important.
>
> If it came up unblocked before 9am cron could see to it that blocking
> happens.
>
> > An ideal solution would allow dhcp updates, ntp etc to continue but block
> > any normal user access eg web browsing etc.
>
> 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.

Lisi

Spot on, Lisi! I recently set up a stretch box for my 12-year-old who's interested in getting into Android programming, and he quickly developed the ugly habit of getting up in the middle of the night to watch YouTube videos of other people playing Wii games... Currently he's on his summer holiday so it isn't doing much harm, but in a few weeks he'll be back to school and as a responsible parent I can't let this continue. Simply asking him to stop doesn't have the desired effect, naturally. My wife is about an inch away from banning the computer altogether, and I'm trying to find an acceptable compromise to prevent that...

Mark

Reply to: