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.
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.
The text was updated successfully, but these errors were encountered:
The values stem from the kernel timezone offset, try setting option utc_time 1 in your rule. Furthermore your used firewall version is quite old, please try to reproduce the problem on a current version.
Correction, I tracked it down to the use of mktime() instead of gmtime() - this causes the firewall to generate timestamps with the local timezone offset.