k-szuster / luci-access-control

OpenWrt internet access scheduler
Apache License 2.0
150 stars 47 forks source link

Client rules don't apply by default #34

Open abstractionmage opened 1 year ago

abstractionmage commented 1 year ago

The firewall rules created via luci-access-control's UI don't work by default on my router. Manually changing the automatically generated firewall rules' "Protocol" setting from the default value of "0" to "Any" seems to fix them (see demonstration in the gif screen capture below).

luci-acces-control not working

OpenWrt version: 22.03.2 r19803-9a599fee93 Router model: TP-Link WR841N version 13.1

minax007 commented 1 year ago

@abstractionmage Thank you very much for the excellent illustration on how to set it up correctly. Now it works fine.

Nevertheless it would be good if @k-szuster could fix this issue. Thanks in advance!

AlicjaWC commented 1 year ago

If you have the possibility, I suggest experimenting with the file /usr/lib/lua/luci/model/cbi/acces_control.lua I think the line 110 is responsible for this -- self.map:set(section, "proto", "0") And if you can determine what value should be inserted instead of "0", give feedback. As I see the problem occurred in OpenWrt 22.03.

ml1969 commented 1 year ago

@AlicjaWC I had the same problem on OpenWrt 22.03.0 r19685-512e76967f I edited /usr/lib/lua/luci/model/cbi/acces_control.lua line 70 from s_rule.defaults.proto = "0" to s_rule.defaults.proto = "any" and it seems to work 👍