Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Bypassing Firewall Filters

This example describes how to configure multiple filters using the service-filter-hit match/action combination and contains the following sections:

Before You Begin

When using the service-filter-hit match/action combination, keep the following in mind:

  • The order in which the filters are applied is important. You can ensure the order in which the filters are processed by specifying a filter precedence value for the interface. See Defining Dynamic Filter Processing Order for more information about dynamic filter processing and how to use the precedence statement.

Filter Bypass Overview

Packets must pass through each filter in a chain. However, if you create a chain of filters to process different types of packets (for example, voice, video, and data packets), you can streamline the filter process, decreasing the amount of packet handling for each filter in the chain, effectively bypassing unnecessary filters, by using the service-filter-hit match/action combination at the [edit firewall family family-name filter filter-name term term-name] hierarchy level.

Figure 1 shows the logical processing flow through a chain of three filters (voice, video, and data) where only processing for a specific data type is desired. This configuration example shows an ingress filter flow. Though subsequent ingress filters in a chain can detect whether the service-filter-hit action is set, egress filters do not. To bypass egress filters, you must also configure the service-filter-hit match/action combination on those filters.

Figure 1: Logical Flow Example for Filter Bypass ProcessingLogical Flow Example for Filter Bypass Processing

Configuring Filter Bypass

CLI Quick Configuration

To quickly configure this example:

Configuring the Voice Filter

Step-by-Step Procedure

To configure the voice filter for the logical flow in Figure 1:

  1. Configure the filter to apply the assured forwarding class and set the service-filter-hit action for traffic from a specific address and port range (over which voice traffic is expected).

  2. Configure the filter default action to pass (accept) packet traffic from any other address or port range.

Configuring the Video Filter

Step-by-Step Procedure

To configure the video filter for the logical flow in Figure 1:

  1. Configure the filter to pass (accept) incoming packets that are tagged by the service-filter-hit action.

  2. Configure the filter to apply a video policer and set the service-filter-hit action for traffic from a specific address (over which video traffic is expected).

  3. Configure the filter default action to pass (accept) packet traffic from any other address or port range.

Configuring the Data Filter

Step-by-Step Procedure

To configure the data filter for the logical flow in Figure 1:

  1. Configure the filter to pass (accept) incoming packets that are tagged by the service-filter-hit action.

  2. Configure the filter to apply a data policer and set the service-filter-hit action for traffic from a specific address (over which video traffic is expected).

Results

Display the results of the configuration: