Allow firewall for 20 mins

I'm trying to configure the firewall rules. Pretty much what I'm looking for is to allow Internet only for 20 minutes with single rule, ideally. Here is the setup I have for two rules:

firewall.@rule[10]=rule
firewall.@rule[10].name='REJECT_ALL'
firewall.@rule[10].src='lan'
firewall.@rule[10].dest='wan'
firewall.@rule[10].start_time='00:00:01'
firewall.@rule[10].stop_time='23:59:59'
firewall.@rule[10].weekdays='Mon Tue Wed Thu Fri Sat Sun'
firewall.@rule[10].target='REJECT'
firewall.@rule[11]=rule
firewall.@rule[11].name='ALLOW_SOME'
firewall.@rule[11].src='lan'
firewall.@rule[11].dest='wan'
firewall.@rule[11].start_time='14:10:00'
firewall.@rule[11].stop_time='14:30:00'
firewall.@rule[11].weekdays='Mon Tue Wed Thu Fri Sat Sun'
firewall.@rule[11].target='ACCEPT'

date output:

Sat Jul 16 14:13:56 PDT 2022

And my Internet doesn't work. Am I right that the syntax above won't work and I will need to create two rules with the timespan I want to allow? Ideally I want only one rule, since it's much easier to change than changing two rules.

Re-order firewall rules, REJECT rule must be after ALLOW rule.

4 Likes

You also don't need to specify the time in the rejecting rule. There is a gap of 2 seconds because of that.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.