OpenWrt Forum Archive

Topic: Luci - internet access schedule

The content of this topic has been archived between 24 Apr 2018 and 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Perfect! Exactly what I was looking for. I agree when can we see this in the standard package list????

Hi everyone,

when I try to install this under 15.05 CC, it says it's unable to find the control file and nothing I have found online is helping. I would love to have this to protect my daughter from... ahem... unsavoury minecraft users and promote her going to bed at a proper time (which is why I want to implement this as a deterrent).

Hello

I tried this tools and have some experimental:
- we need to restart router after copy all necessary file to router for settings appeared in Network menu
- restriction works for web service only in my case (android 4.4 wifi connection), youtube, playstore still accessible.
- after I install/enable Privoxy it seems it messed up firewall rule and have no restriction at all to clients.

Hope other can fix and further develop this idea. thank you

One flaw with this is that it fails to stop any connections that are already established when you reach the stop_time. Check the following thread for possible solutions.

forum.openwrt.org/viewtopic.php?id=65807

@k.szuster1

luci-access-control works nice on TP WR1043ND V3, thank you!

One question:

what is the difference between 'enable' and 'ac_enable' in the firewall configuration file ?

wally345 wrote:

what is the difference between 'enable' and 'ac_enable' in the firewall configuration file ?

"enable" is the actual toggle switch that the firewall init script reads.

"ac_enable" is internal to this package and firewall knows nothing about it. It is subject to the "general" switch in /etc/config/access_control (that is the global on/off for this package). This Luci package sets "enable" for each host based on "general" and "ac_enable".

(Last edited by hnyman on 1 Sep 2016, 09:57)

thank you, now it's clear

Exactly what i wanted - Thanks!

HI everyone, this is my first post.  I've just changed my firmware on my Linksys AC1900 (v1) to OpenWrt without bricking it (Yaaay!).

The feature I used the most on the stock firmware are the parental controls and it is something I need in order to keep using OpenWrt, hence my interest in installing internet-access-schedule.

I can't find it in the available packages when searching via the router.  How would I go about manually installing the ipk file? 

Thanks for your help to my probably obvious question

NEW VERSION AVAILABLE

New feature: you can issue a "ticket" for any user, who is subject to the internet restrictions. If a user needs extra time to access the internet, you can give him a ticket. The internet is not blocked for a specified amount of time and then the access is blocked automatically.
A ticket validity is 60 minutes by default, but you may change it as required.

It looks like this now:
https://github.com/k-szuster/luci-access-control-package/raw/master/snapshot1.png?raw=true

The software should work on any platform without need of recompiling.
Tested with OpenWrt BB and CC.
Note: due to a bug in CC, all times must be set in UTC. On BB - use your local time

Package ready to install on all platforms:
https://github.com/k-szuster/luci-acces … .4_all.ipk

Source repository:
http://k-szuster.github.io/luci-access-control
as a Luci app, and:
http://k-szuster.github.io/luci-access-control-package
as a standalone package.
Both contain the same code.

I installed the Ipk via opkg. Its not showing up in Luci.

(Last edited by iceberg9992004 on 20 Nov 2016, 08:01)

@iceberg...
After installation a reboot is needed...

Sorry i ended up rebooting last night and i see it now. When i set the mac i want the box goes red.

Having some issues. 

First, here is my config:
System
Hostname    GL-AR150
Model    GL AR150
Firmware Version    OpenWrt Chaos Calmer 15.05 / LuCI 15.05-54-gfd60055 Release (git-15.363.78009-956be55)
Kernel Version    3.18.23
Local Time    Mon Nov 21 20:28:21 2016

I have set my Router time to UTC, based on the note about CC requiring use of UTC.

Q1: Are the rule dates and times supposed to determine when access is blocked, or access is enabled?  I have tried to test for myself, but my results are inconclusive.

Q2: Which config file or script should be changed when I make a change to the LuCi for Access Control?  Should the firewall rules change?

Q3: Does a 60 min ticket simply open up access for the following 60 min after which it is created?  Does the countdown begin even if that user is not currently connected?

(Last edited by klaberte on 21 Nov 2016, 22:11)

Sorry for not responding. I don't get notification about new posts from this forum.

klaberte wrote:

Q1: Are the rule dates and times supposed to determine when access is blocked, or access is enabled?  I have tried to test for myself, but my results are inconclusive.

A rule specifies when access is blocked.
If a rule is not enabled, then access is not blocked.

klaberte wrote:

Q2: Which config file or script should be changed when I make a change to the LuCi for Access Control?  Should the firewall rules change?

The config files are: firewall and access_control. Firewall rules do change (actually new rules appear).

klaberte wrote:

Q3: Does a 60 min ticket simply open up access for the following 60 min after which it is created?  Does the countdown begin even if that user is not currently connected?

Exactly. The countdown begins at the moment of issuing a ticket.

k.szuster1 wrote:

I've made a Luci module, which allows to restrict the access to the internet for specific hosts.

http://k-szuster.github.io/luci-access-control/

You can block internet access for any single host. The hosts are  chosen
by MAC found on a simple  pop-up list.
Every host may be blocked permanently or have it's own"From time" - "To time" rule. You cam switch on/off each  individual rule or the whole filter by single click..

The existing solutions were not satisfactory for me (although inspiring):
- wifischedule blocks all wifi, bot specific hosts, and not wired LAN ethernet connection
- Mom's Internet Access is close to my needs, but too complicated to build for non-hackers and not integrated with Luci.
- Gargoyle has got sophisticated filtering, but... too sophisticated for every mummy. After all, not every platform supports Gargoyle (mine not).
- Manual editing of iptables' ruless - not for everyday use.

Simple installation: don't build ipk if you don't wish to, just copy a few files to your router. No scripts and  daemons to be cross-compiled. It just makes use of the standard OpenWrt firewall.

Enjoy

Integration with LuCI is excellent! But will this terminate an existing connection once shutdown time is reached?

wayne1958 wrote:

Integration with LuCI is excellent! But will this terminate an existing connection once shutdown time is reached?

No.
This issue was mentioned several times. See https://forum.openwrt.org/viewtopic.php?id=65807 for possible colutions.

In short: iptables does NOT break existing connection whet a rule becomes active. Only newly opened connections are subject to iptables' rules.
You could restart/flush the firewall but this would kill all open  connections.

Hi, what if i want to restrict all connections, not a specific MAC address, is it possible to create a rule with wildcard in field "MAC address", like asterisk etc?

The discussion might have continued from here.