Tried to export, remove and add via CLI, no use.
Looks like at any time the rule should be employed - but isn’t, it comes into effect by disabling/enabling it.
For a workaround I added a script that is scheduled to run every 5 minutes.
It iterates through the rules, and for every rule that is enabled, it is disabled and then enabled.
(I want to keep disabled rules without fooling with them)
This does the trick, although a little dirty:
/ip firewall filter
add action=drop chain=forward comment="Drop 0000-0800 all days" dst-address=\
!*.*.86.2 in-interface=ether1 log=yes log-prefix=\
"DROP 0000-0800 ALL DAYS" src-address=!192.168.2.99 time=\
0s-8h,sun,mon,tue,wed,thu,fri,sat
add action=drop chain=forward comment="Drop 2200-0000 mon-thu and sun" \
disabled=yes dst-address=!*.*.86.2 in-interface=ether1 log=yes \
log-prefix="DROP 2200-0000 MON-THU+SUN" src-address=!192.168.2.99 time=\
22h-23h59m59s,sun,mon,tue,wed,thu
/system scheduler
add interval=5m name=schedule1 on-event=refreshtimerules policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=\
jun/21/2016 start-time=07:30:00
/system script
add name=refreshtimerules owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive source=":foreach \
rule in=[ /ip firewall filter find disabled=no ] do={ \r\
\n :log info \"Disabling / enabling time based firewall rules\"\r\
\n /ip firewall filter disable \$rule \r\
\n :delay 1\r\
\n /ip firewall filter enable \$rule \r\
\n}\r\
\n"
It would be even better if I could do this only to rules that are rendered “inactive”.
Anyone that knows how to script this?
To be very picky, the ultimate solution would be to do a check whether the rule “ought” to be active and compare this to the current “active/inactive” status, but this would require parsing of the “time” parameter and a lot of fiddling around, so I didn’t try that.
And- either way, this should be taken care of in RouterOS…
Mikrotik/Normis: any idea why this bug is still around? 