A
A
ASKOE2015-11-09 14:28:57
linux
ASKOE, 2015-11-09 14:28:57

How to allow network access for one hour?

How can you make Internet access for one hour, and the next session only after an hour. For example, a child from a tablet connects to the router at 13:20. The router with OpenWRT at 14:20 disables the device's access to the Internet but does not disconnect from the network, and will allow access no earlier than at 15:20. Is there such a possibility in IPTABLES, otherwise they write the same thing everywhere through --timestart 13:20 --timestop 14:20? Tell me where to look. Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Azazel PW, 2015-11-09
@azazelpw

iptables+crontab

K
Konkase, 2015-11-09
@Konkase

We prohibit all forwarding and allow only at certain times

iptables -P FORWARD DROP
iptables -I FORWARD -m time --timestart 13:20:00 --timestop 14:20:00 --kerneltz -j ACCEPT
iptables -I FORWARD -m time --timestart 15:20:00 --timestop 15:20:00 --kerneltz -j ACCEPT

L
LESHIY_ODESSA, 2015-11-09
@LESHIY_ODESSA

OpenWRT - Parental control.
Additional arguments:
But I would still do it differently. It is necessary to differentiate access on the tablet. Get different users and put the program "Parental Control". Children bypass them too, but still a router is not an option. The child will easily find out the password from the neighbor's Wi-Fi, share the Internet from a mobile phone and a million more ways.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question