Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

IDP Sensor Configuration

IDP Sensor Configuration allows administrators to configure settings for optimizing IDP performance on SRX Series Firewalls. It explains how to limit memory and session usage, control traffic drops when resources are exceeded and configure IDP Intelligent Bypass for managing high CPU utilization. It also covers handling conditions during failovers.

You cannot create application signatures with the IDP signature database. However, you can configure sensor settings to limit sessions and memory usage for Application Identification (AppID).

IDP Sensor Configuration Overview

Sensor configuration options are used to:

  • Log run conditions as IDP session capacity and memory limits are approached.

  • Analyze traffic dropped by IDP and application identification when the limits are exceeded.

You can configure the maximum amount of memory bytes that can be used to save packets for application identification for one TCP or UDP session. You can also configure a limit for global memory usage for application identification. AppID is disabled for a session after the system reaches the specified memory limit for the session. However, IDP continues to match patterns. The matched application is saved to cache so that the next session can use it. This protects the system from attackers trying to bypass AppID by purposefully sending large client-to-server packets.

Although you cannot create application signatures with the IDP signature database, you can configure the following sensor settings to limit the number of sessions running application identification and also to limit memory usage for application identification:

  • max-tcp-session-packet-memory—To configure memory and session limits for IDP AppID services, run the set security idp sensor-configuration application-identification max-tcp-session-packet-memory 5000 command.

  • memory-limit-percent—To set memory limit percentage for data plane available in the system, which can be used for IDP allocation, run the set security idp sensor-configuration global memory-limit-percent command. The supported percentage value is from 10 through 90.

  • drop-if-no-policy-loaded—At startup, traffic is ignored by IDP by default if the IDP policy is not yet loaded. The drop-if-no-policy-loaded option changes this behavior so that all sessions are dropped before the IDP policy is loaded.

    The following counter for the show security idp counters flow command output analyzes dropped traffic due to the drop-if-no-policy-loaded option:

  • drop-on-failover—By default, IDP ignores failover sessions in an SRX Series chassis cluster deployment. The drop-on-failover option changes this behavior and automatically drops sessions that are in the process of being inspected on the primary node when a failover to the secondary node occurs.

    The following counter for the show security idp counters flow command output analyzes dropped failover traffic due to the drop-on-failover option:

  • drop-on-limit—By default, sessions are not dropped if the IDP session limit or resource limits are exceeded. In this case, IDP and other sessions are dropped only when the device’s session capacity or resources are depleted. The drop-on-limit option changes this behavior and drops sessions when resource limits are exceeded.

    The following counters for the show security idp counters flow command output analyze dropped IDP traffic due to the drop-on-limit option:

    The following counters for the show security idp counters application-identification command output analyze dropped AppID traffic due to the drop-on-limit option:

    The following options are used to trigger informative log messages about current run conditions. When set, the log messages are triggered whether the drop-on-limit option is set or not.

  • max-sessions-offset—The max-sessions-offset option sets an offset for the maximum IDP session limit. When the number of IDP sessions exceeds the maximum session limit, a warning is logged that conditions exist where IDP sessions could be dropped. When the number of IDP sessions drops below the maximum IDP session limit minus the offset value, a message is logged that conditions have returned to normal.

  • min-objcache-limit-lt—The min-objcache-limit-lt option sets a lower threshold for available cache memory. The threshold value is expressed as a percentage of available IDP cache memory. If the available cache memory drops below the lower threshold level, a message is logged stating that conditions exist where IDP sessions could be dropped because of memory allocation failures. For example, the following message shows that the IDP cache memory has dropped below the lower threshold and that a number of sessions have been dropped:

  • min-objcache-limit-ut—The min-objcache-limit-ut option sets an upper threshold for available cache memory. The threshold value is expressed as a percentage of available IDP cache memory. If available IDP cache memory returns to the upper threshold level, a message is logged stating that available cache memory has returned to normal. For example, the following message shows the available IDP cache memory has increased above the upper threshold and it is performing normally:

    The message triggers only when available memory falls below the lower threshold and then rises above the upper threshold. Memory fluctuations above the lower threshold do not trigger the message.

In the IDP Intelligent Bypass default configuration, IDP attempts to inspect new and existing sessions, regardless of CPU utilization. This can lead to dropped packets, latency, and instability across the system during high CPU utilization events. To overcome unpredictable IDP packet processing behavior, you can enable the IDP Intelligent Bypass feature. This feature gives you the flexibility to bypass IDP or to drop the packets when the system CPU utilization reaches a high level, otherwise known as “Failing Open” (permit packets) or “Failing Closed” (dropping packets). By default, IDP Intelligent Bypass feature is not enabled. The following options are used to configure the IDP Intelligent Bypass feature.

  • idp-bypass-cpu-usage-overload—By default, IDP may consume 100 percent of available CPU and may begin dropping packets for all sessions inadvertently. To handle IDP packet processing behavior when the system CPU utilization reaches high threshold value, you can enable the IDP Intelligent Bypass feature. To enable IDP Intelligent Bypass feature, issue the set security idp sensor-configuration flow idp-bypass-cpu-overload command. By default, IDP Intelligent Bypass feature is not enabled.

  • idp-bypass-cpu-threshold—IDP stops inspecting new sessions when CPU utilization reaches the defined threshold value. The default threshold CPU utilization value is 85 percent. When CPU utilization reaches threshold value, IDP keeps on bypassing new sessions until CPU utilization falls below the lower threshold value. Alternatively, if you set the drop-on-limit, where IDP drops new session until CPU utilization falls below the lower threshold value. To configure the threshold value, issue set security idp sensor-configuration flow idp-bypass-cpu-threshold command. You can set a threshold value in the range 0 through 99. This threshold value is expressed as a percentage.

  • idp-bypass-cpu-tolerance—To configure the tolerance value, issue the set security idp sensor-configuration flow idp-bypass-cpu-tolerance command. You can set a tolerance value in the range 1 through 99. The default tolerance value is 5. This tolerance value is expressed as a percentage.

You can calculate the CPU upper and lower threshold values by using the following equations:

CPU upper threshold value = CPU threshold + CPU tolerance value.

CPU lower threshold value = CPU threshold - CPU tolerance value.

Figure 1: Understanding IDP Packet Processing Behavior During High ThresholdGraph showing CPU utilization with high and low thresholds. Red marker: IDP stops inspecting new sessions. Green marker: IDP stops all inspections. Blue marker: IDP resumes normal mode.

When the system CPU utilization exceeds the threshold value, IDP stops inspecting new sessions, but continues to inspect existing sessions. In this state, if drop-on-limit is set, IDP starts dropping new sessions. Log messages are triggered to indicate new sessions are dropped. For example, the following message states that IDP CPU utilization has crossed the threshold value and IDP may drop new sessions:

When the system CPU utilization exceeds the upper threshold value, IDP stops inspecting the packets of existing sessions and new sessions. In this state, no packets can go through IDP inspection. If drop-on-limit is set, IDP drops all sessions. Log messages are triggered to indicate all sessions are dropped. For example, the following message states that IDP CPU utilization has crossed the upper threshold value, and IDP stops inspecting the packets of the existing sessions and new sessions:

When the system CPU utilization falls below the lower threshold value, IDP starts inspecting new session and returns to normal mode. IDP will not inspect existing discarded sessions. Log messages are triggered to indicate IDP starts inspecting new session and returned to normal mode. For example, the following message states that IDP CPU utilization falls below the lower threshold value, and IDP returns to normal mode:

IDP Protection Modes

IDP protection modes adjust the inspection parameters for efficient inspection of traffic in the device. To enable the IDP protection modes, issue the security-configuration protection-mode mode command at the [edit security idp sensor-configuration] hierarchy level.

user@host# set security-configuration protection-mode mode

There are four IDP protection modes:

All IDP protection modes inspect CTS (Client To Server) traffic.

Table 1: IDP Protection Modes

Mode

Description

Perimeter-Full

Inspects all STC(Server To Client) traffic.

Processes TCP errors without any optimization.

This is the default mode.

Perimeter

Inspects all STC traffic.

Processes TCP errors with optimization. For TCP packets, if SYN is received in a window and has a TCP error flag set, then process the TCP error and take appropriate action. Drop the current packet and ignore inspection on the entire session.

Datacenter-Full

Disables all STC traffic inspection.

Processes TCP errors without any optimization.

Datacenter-Full can be used in situations where the SRX Series Firewall is only responsible for protecting servers whose response traffic is not deemed interesting for analysis. Datacenter-Full should not be used in cases where the SRX Series Firewall is responsible for protecting clients.

Datacenter

Disables all STC traffic inspection.

Processes TCP errors with optimization. For TCP packets, if SYN is received in a window and has a TCP error flag set, then process the TCP error and take appropriate action. Drop the current packet and ignore inspection on the entire session.

Datacenter configuration is optimized to provide balanced protection and performance.

Example: Improve Logging and Traffic Analysis with IDP Sensor Configuration Options

This example shows how to improve logging and traffic analysis by configuring IDP sensor configuration options. In addition, you can use these options to log run conditions as IDP session capacity and memory limits are approached, and to analyze traffic dropped by IDP and application identification when exceeding these limitations.

Requirements

Before you begin:

  • Configure network interfaces.

  • Download the signature database. See Updating the IDP Signature Database Manually. Application signatures are available as part of the security package provided by Juniper Networks. You download predefined application signatures along with the security package updates.

Overview

The IDP sensor monitors the network and detects suspicious and anomalous network traffic based on specific rules defined in IDP rulebases. It applies attack objects to traffic based on protocols or applications. Application signatures enable the sensor to identify known and unknown applications running on nonstandard ports and to apply the correct attack objects.

The default behavior of IDP is to ignore the sessions when:

  • IDP policy is not configured in the device

  • Resource limits (memory or active sessions) are reached

  • In case of Chassis Cluster, for fail over sessions

If traffic availability is considered more important than security, then it is recommended to continue to use the above mentioned default behavior of IDP. However, If security is considered more important than availability, then it is recommended to change the default behavior with the configuration provided in this example.

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To set IDP sensor configuration options:

  1. Specify the memory limits for application identification.

  2. Specify that traffic is dropped before the IDP policy is loaded.

  3. Specify that failover sessions in an SRX Series chassis cluster deployment are dropped.

  4. Specify that sessions are dropped when resource limits are exceeded.

    Run the delete drop-on-limit command to prevent sessions drops when resource limits are exceeded.

  5. Configure an offset value for the maximum IDP session limit.

  6. Set a lower threshold for available cache memory.

  7. Set an upper threshold for available cache memory.

Results

From configuration mode, confirm your configuration by entering the show security idp command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

Verify IDP Sensor Configuration Settings

Purpose

Verify the IDP sensor configuration settings.

Action

From operational mode, enter the show security idp sensor-configuration command.

Meaning

The show security idp sensor-configuration command displays all sensor configuration options that are set with certain values.

Verify IDP Counters

Purpose

Verify the IDP counters.

Action

From operational mode, enter the show security idp counters flow command.

Sample Output
Meaning

The show security idp counters flow command displays all counters that are used for analyzing dropped failover traffic, dropped IDP traffic, and dropped application identification traffic.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
19.2R1
If the configured CPU and memory threshold values exceed the resource limits, then IDP intelligent inspection helps the device recover from the overload state. You can enable IDP intelligent inspection and tune it dynamically to reduce the load of full IDP inspection.