Firewall - firewall rules with time+date don't seem to work
Username: Duane Butler
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1483
I am running openwrt_cc, and having trouble with time+date based firewall rules. Time based rules (without date) work fine, but as soon as I add the date, the time no longer works. I expect such rules to take effect at the specified times within the specified dates. The resulting iptables do not look right. See below.
PKG_NAME:=firewall
PKG_VERSION:=2015-07-27
PKG_SOURCE_
URL
:=git://nbd.name/firewall3.git
PKG_SOURCE_VERSION:=980b7859bbd1db1e5e46422fccccbce38f9809ab
firewall uci:
config rule
option name 'lan-00:16:3e:d2:96:cf' option src 'lan' option dest 'wan' option proto 'any' option target 'REJECT' option src_mac '00:16:3e:d2:96:cf' option start_date '2018-04-10' option stop_date '2018-04-11' option start_time '20:30:00' option stop_time '20:40:00'
iptables entry:
0 0 zone_wan_dest_REJECT all -- any any anywhere anywhere MAC 00:16:3E:D2:96:CF TIME from 20:30:00 to 20:40:00 starting from 2018-04-10 01:00:00 until date 2018-04-11 01:00:00 UTC /* lan-00:16:3e:d2:96:cf */
Notice the date values are followed by “01:00:00” which doesn’t seem right. I can’t seem to control these values in any way from the uci.