home

Supported platforms

Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

Activating firewall rules during specific time periods

The vRouter supports time-based firewall rules, which limit the operation of a rule to specific periods of time.

The firewall rule shown in the following example shows how to limit the rule configured in the previous example to being active only on weekdays from 9:00 AM until 5:00 PM. To add this limitation to the rule, perform the following steps in configuration mode.

Table 1. Activating firewall rules during specific time periods
Step Command

Set a start time of 9:00 AM.

vyatta@R1# set security firewall name NEGATED-EXAMPLE rule 10 time starttime 09:00:00

Set a stop time of 5:00 PM.

vyatta@R1# set security firewall name NEGATED-EXAMPLE rule 10 time stoptime 17:00:00

Set the days of the week.

vyatta@R1# set security firewall name NEGATED-EXAMPLE rule 10 time weekdays Mon,Tue,Wed,Thu,Fri

Commit the configuration.

vyatta@R1# commit

Show the configuration.

vyatta@R1# show security firewall 

name NEGATED-EXAMPLE {
    rule 10 {
        action accept
        description "Allow all traffic from LAN except to server 192.168.1.100"
        destination {
            address !192.168.1.100
        }
        source {
            address 172.16.1.0/24
        }
        time {
            starttime 09:00:00
            stoptime 17:00:00
            weekdays Mon,Tue,Wed,Thu,Fri
        }
    }
}

vyatta@R1# show interfaces dataplane dp0p1p1

    address 172.16.1.1/24 
    firewall {
        in {
            name NEGATED-EXAMPLE
        }
    }