Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #170720
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Limiting internet access by time |
| Date | 2016-08-05 02:10 +0200 |
| Message-ID | <s2AS5-af-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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. 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. An ideal solution would allow dhcp updates, ntp etc to continue but block any normal user access eg web browsing etc. I've got a solution in mind and would like to see if the community has any better ideas. I'm thinking of installing iptables, creating an iptables script that blocks Internet access (not local addresses) except ntp and dhcp, and another to open everything up again, and using a systemd service that runs a script to check the time and run the appropriate iptables script. That service then gets linked in multi-user.wants to get run at startup. Then cron jobs can take care of the 9am and 9pm switch overs, calling the same scripts as appropriate. Is there a better way to do this? Mark
Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread
Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-05 02:10 +0200
Re: Limiting internet access by time Lars Noodén <lars.nooden@gmail.com> - 2016-08-05 09:30 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-05 17:40 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-05 12:50 +0200
Re: Limiting internet access by time Lisi Reisz <lisi.reisz@gmail.com> - 2016-08-05 13:10 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-05 16:10 +0200
Re: Limiting internet access by time David Wright <deblis@lionunicorn.co.uk> - 2016-08-05 18:00 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-05 18:00 +0200
Re: Limiting internet access by time Dan Ritter <dsr@randomstring.org> - 2016-08-05 19:50 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-05 21:10 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-06 03:40 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-06 07:30 +0200
Re: Limiting internet access by time Dan Ritter <dsr@randomstring.org> - 2016-08-07 03:00 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-07 05:40 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-07 20:20 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-08 02:10 +0200
Re: Limiting internet access by time Dan Ritter <dsr@randomstring.org> - 2016-08-09 19:30 +0200
Re: Limiting internet access by time Stefan Monnier <monnier@iro.umontreal.ca> - 2016-08-09 21:20 +0200
Re: Limiting internet access by time Dan Ritter <dsr@randomstring.org> - 2016-08-10 15:40 +0200
Re: Limiting internet access by time Stefan Monnier <monnier@iro.umontreal.ca> - 2016-08-10 17:00 +0200
Re: Limiting internet access by time Dan Ritter <dsr@randomstring.org> - 2016-08-10 18:10 +0200
Re: Limiting internet access by time Stefan Monnier <monnier@iro.umontreal.ca> - 2016-08-10 22:40 +0200
Re: Limiting internet access by time Brian <ad44@cityscape.co.uk> - 2016-08-05 20:50 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-06 07:30 +0200
Re: Limiting internet access by time Mark Fletcher <mark27q1@gmail.com> - 2016-08-05 16:30 +0200
Re: Limiting internet access by time pv29@gatech.edu - 2016-08-08 01:10 +0200
Re: Limiting internet access by time Curt <curty@free.fr> - 2016-08-08 09:00 +0200
Re: Limiting internet access by time pascalv@sdf.org - 2016-08-08 10:30 +0200
Re: Limiting internet access by time Karol Augustin <karol@augustin.pl> - 2016-08-08 12:00 +0200
csiph-web