Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


clear firewall



Clear statistics provided by firewall filters.

Note: The clear firewall command cannot be used to clear the Routing Engine filter counters on a backup Routing Engine that is enabled for GRES.

When you clear the counters of a filter, this not only impacts the counters shown by the CLI, but also the ones tracked by SNMP 2.

If you clear statistics for firewall filters that are applied to Trio-based DPCs and that also use the prefix-action action on matched packets, wait at least 5 seconds before you enter the show firewall prefix-action-stats command. A 5-second pause between issuing the clear firewall and show firewall prefix-action-stats commands avoids a possible timeout of the show firewall prefix-action-stats command.



Clear the packet and byte counts for all firewall filter counters and clear the packet counts for all policer counters.

counter counter-name

Clear the packet and byte counts for the specified firewall filter counter.

filter filter-name

Clear the packet and byte counts for the specified firewall filter.

policer counter (all | counter-id counter-index)

Clear all policer counters using the policer counter all command, or clear a specific policer counter using the policer counter counter-id counter-index command. The value of counter-index can be 0, 1, or 2.

Required Privilege Level


Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

clear firewall all

clear firewall counter

clear firewall filter

Release Information

Command introduced in Junos OS Release 11.1.