MAC filtering based on time schedule

Hello,

Is it possible to configure (possibly with an extension) the MAC filtering, so that certain devices can be allowed or denied access based on the date and time? I searched for an answer or tips, but could not find anything.

Regards,
George

I do not believe so out-of-the-box. In theory, a shell script and cron could do this. What are you trying to achieve? Limit kids access to internet? That can be done with a firewall rule denying access to WAN which you can script with a cron job to start stop.

For example, rule 15 on my router setups a reject policy based on IP address:

Protocol=any
Source zone=trusted
Source address=10.1.10.108
Destination zone=WAN
Destination address=any
Action=reject

This rule can be toggled on or off with a trivial shell script:

#!/bin/sh
test=$(uci -q get firewall.@rule[15].enabled)
if [ $test -eq 1 ]; then
 echo "disabling rule 15 ... WAN access available"
 uci set firewall.@rule[15].enabled=0
else
 echo "enabling rule 15 ... WAN access restricted"
 uci set firewall.@rule[15].enabled=1
fi

fw3 reload &>/dev/null
uci commit

You can add a case statement to the script to read the first token for a formal "up" and "down" action but you see the point.

Thanks, I will give it a try.