Cisco Guard Configuration Guide (Software Version 5.0)
Configuring Policy Templates and Policies

Table Of Contents

Configuring Policy Templates and Policies

Understanding Zone Policies

Using Policy Paths

Creating Policies

Understanding Policy Templates

Configuring Policy Template Parameters

Configuring the Maximum Number of Services

Configuring the Minimum Threshold

Configuring Policy Template States

Configuring All Policy Template Parameters Simultaneously

Understanding Policy Path Sections

Policy Template

Service

Adding a Service

Deleting a Service

Protection Level

Packet Types

Traffic Characteristics

Configuring Policy Parameters

Changing the Policy State

Configuring the Policy Threshold

Setting the Policy Threshold

Setting the Threshold as Fixed

Configuring a Threshold Multiplier

Multiplying a Threshold by a Factor

Configuring Specific IP Thresholds

Configuring the Proxy-Threshold

Configuring the Policy Timeout

Configuring the Policy Action

Configuring the Policy Interactive Status

Monitoring Policies

Displaying Policies

Displaying Policy Statistics

Using Snapshots to Verify the Results of the Learning Process

Creating Snapshots

Comparing Learning Results

Comparing Snapshots

Comparing Zones

Displaying Snapshots

Copying Policies

Backing Up Policy Configuration


Configuring Policy Templates and Policies


This chapter describes the Cisco Guard (Guard) zone policies, policy structure, and policy templates, and it describes how to configure the zone policy and the policy template parameters.

This chapter contains the following sections:

Understanding Zone Policies

Understanding Policy Templates

Understanding Policy Path Sections

Configuring Policy Parameters

Monitoring Policies

Using Snapshots to Verify the Results of the Learning Process

Backing Up Policy Configuration

Understanding Zone Policies

To perform statistical analysis of traffic flow, the Guard has definitions that handle specific types of traffic, which are called zone policies, that are the building blocks of the Guard and are the basis to which the Guard compares the zone traffic. The zone policies constantly measure traffic flows and take action against a particular traffic flow if they identify that flow as malicious or abnormal, which occurs when the flow exceeds the policy threshold, and configure a set of filters (dynamic filters) dynamically to apply the appropriate protection level to the traffic flow according to the severity of the attack.

To create the zone policies, the Guard learns the zone traffic in a two-phase learning process: it uses pre-defined policy templates to construct the policies, and then learns the policy thresholds. Each policy template is used to create policies that contain specific protection aspects that the Guard requires to protect against a specific DDoS threat.

After the Guard creates and tunes the zone policies, you can add and delete policies or change policy parameters.

Using Policy Paths

A zone policy defines the characteristics that the Guard uses to analyze and measure the zone traffic flow. The name of the policy is composed of sections that describe the traffic characteristic it measures. For example, the policy http/80/analysis/syns/src_ip measures traffic flows of HTTP SYN packets destined to port 80 that were authenticated by the Guard Analysis protection level functions and aggregated according to source IP addresses.

Figure 7-1 provides an example of a zone policy name.

Figure 7-1 Policy Name

Table 7-1 describes the policy name sections.

Table 7-1 Policy Name Sections 

Section
Description

Policy template

Denotes which policy template was used to construct the policy. Each policy template deals with the aspects that the Guard requires to protect against a specific DDoS threat. See the "Understanding Policy Templates" section for more information.

Service

Denotes the port number or protocol number to which the zone policy relates. See the "Service" section for more information.

Protection Level

Denotes the protection level that the Guard applies on the traffic flow. See the "Protection Level" section for more information.

Packet Types

Denotes the packet types that the Guard monitors. See the "Packet Types" section for more information.

Traffic Characteristics

Denotes the traffic characteristics that the Guard uses to aggregate the policy. See the "Traffic Characteristics" section for more information.


The first four sections of the policy name (policy template, service, protection level and packet type) define the type of traffic that is analyzed. The last section of the policy path (traffic characteristics) defines how to analyze the flow.

Policies have cross dependencies and priorities. If there are two policies that define the same traffic flow, the Guard analyzes the flow using the policy that is more specific. For example, policies relating to TCP services exclude the HTTP services that are handled by the HTTP-related policies.

You can configure the policy operational aspects, which define the policy triggers and the action that the policy takes once it is activated. See the "Configuring Policy Parameters" section for more information.

Creating Policies

The Guard creates the zone policies in a learning process that consists of the following two phases during which the Guard learns the zone traffic and adapts itself to the particular zone traffic characteristics. The following are the phases:

1. The Policy Construction Phase—The Guard constructs the zone policies by using the policy templates and discovers the main services that the zone uses.

2. The Threshold Tuning Phase—The Guard tunes the policy thresholds of the services that were discovered during the policy construction phase to fit the zone service traffic rates.

During the learning process, the traffic flows transparently through the Guard. See the "Learning the Zone Traffic Characteristics" section for more information.

Understanding Policy Templates

A policy template is a collection of policy construction rules that the Guard uses during the policy construction phase to create the zone policies. At the end of the policy construction phase, the output of each template is a group of policies. The name of the policy template is derived from the characteristics that are common to all the policies it creates, and can be a protocol (such as DNS), an application (such as HTTP), or the objective (such as ip_scan). For example, the policy template tcp_connections produces policies that relate to connection, such as the number of concurrent connections. When you create a new zone, the Guard includes a set of policy templates in the zone configuration.

Table 7-2 describes the Guard policy templates. The Guard includes these policy templates when you create a new zone using the GUARD_DEFAULT zone template.

Table 7-2 Policy Templates 

Policy Template
Constructs a Group of Policies Relating To

dns_tcp

DNS-TCP protocol traffic.

dns_udp

DNS-UDP protocol traffic.

fragments

Fragmented traffic.

http

HTTP traffic that flows, by default, through port 80 (or other user-configured ports).

ip_scan

IP scanning. A situation in which a client from a specific source IP address tries to access many destination IP addresses in the zone. This policy template is designed primarily for zones in which the IP address definition is a subnet.

By default, this policy template is disabled. The default action for this policy template is notify.

Note The policies that are produced from this policy template are resource consuming and can affect performance.

other_protocols

Non-TCP and non-UDP protocols.

port_scan

Port scanning. A situation in which a client from a specific source IP address tries to access many ports in the zone.

By default, this policy template is disabled. The default action for this policy template is notify.

Note The policies that are produced from this policy template are resource consuming and can affect performance.

tcp_connections

TCP connection characteristics.

tcp_not_auth

TCP connections that have not been authenticated by the Guard anti-spoofing functions.

tcp_outgoing

TCP connections initiated by the zone.

tcp_ratio

Ratios between different types of TCP packets. For example, SYN packets as opposed to FIN/RST packets.

tcp_services

TCP services on ports other than HTTP-related, such as ports 80 and 8080.

tcp_services_ns

TCP services. By default, the policies created from this policy template monitor IRC ports (666X), SSH, and Telnet. This policy template does not create policies with actions that require the Guard to apply the strong protection level to the traffic flow. See the "Understanding the Protection Process" section for more information on the strong protection level.

udp_services

UDP services.



Note The Guard relates first to indicators of TCP traffic on dedicated ports 6660 to 6670 and 21 to 23.

If traffic is traced on these ports, the tcp_services_ns policy template constructs a group of policies, and the tcp_services policy template relates to TCP services on other ports.

If no traffic is traced on these ports, the tcp_services_ns policy template is not used.

You can add services to policies that were created from the tcp_services_ns policy template.


The Guard includes additional policy templates that are designed for protecting zones for which you do not want to use the TCP proxy anti-spoofing functions. You can use these policy templates if the zone is moderated according to IP addresses, such as an Internet Relay Chat (IRC) server-type zone, or if you do not know the type of services that are running on the zone.

If you define a zone with the GUARD_TCP_NO_PROXY zone template, the Guard uses the policy templates described in Table 7-3. The Guard replaces the policy templates http, tcp_connections and tcp_outgoing with the policy templates http_ns, tcp_connections_ns and tcp_outgoing_ns policies respectively. The http_ns, tcp_connections_ns and tcp_outgoing_ns policy templates do not create policies with actions that require the Guard to apply the strong protection level to the traffic flow.

Table 7-3 details the Guard policy templates for GUARD_TCP_NO_PROXY.

Table 7-3 GUARD_TCP_NO_PROXY Policy Templates 

Policy Template
Replaces Policy Template
Constructs a group of policies relating to

tcp_connections_ns

tcp_connections

TCP connection characteristics.

tcp_outgoing_ns

tcp_outgoing

TCP connections initiated by the zone.

http_ns

http

HTTP traffic flowing, by default, through port 80 (or other user-configured ports).


To view a list of all policy templates, enter the policy-template command in zone configuration mode and press TAB twice.

Configuring Policy Template Parameters

During the learning process, zone traffic flows transparently through the Guard. Each active policy template produces a group of policies according to the zone traffic characteristics. The Guard ranks the services (protocol and port numbers) that the policy template relates to by the level of traffic volume. The Guard then selects the services that have the highest traffic volume and that have exceeded the defined minimum threshold, and it creates a policy for each service. Some of the policy templates create an additional policy to handle all traffic flows for which a specific policy was not added with a service of any.

You can configure the following policy template parameters:

Configuring the Maximum Number of Services—Defines the maximum number of services that the Guard picks up for the policy template to create specific policies.

Configuring the Minimum Threshold—Defines the minimum threshold that must be exceeded for the Guard to rank the service.

Configuring Policy Template States—Defines whether or not the Guard produces policies from the policy template.

To configure the policy template parameters, enter the policy template configuration mode by entering the following command in zone configuration mode:

policy-template policy-template-name

The policy-template-name argument specifies the name of the policy template. See Table 7-2 for more information.

After executing the command, the Guard enters the policy template configuration mode.

The following example shows how to enter http policy template configuration mode:

user@GUARD-conf-zone-scannet# policy-template http
user@GUARD-conf-zone-scannet-policy_template-http#

To display the parameters of a specific policy template, use the show command in policy template configuration mode.

Configuring the Maximum Number of Services

The maximum number of services parameter defines the maximum number of services (protocol numbers or port numbers) for which the policy template selects and creates policies. The Guard ranks the services that the policy template relates to by the level of traffic volume for each service. The Guard then selects the services that have the highest traffic volume and that have exceeded the defined minimum threshold (as defined by the min-threshold parameter), and it creates policies for each service. The Guard may add an additional policy with a service of any to handle all other traffic flows with the characteristics of the policy template.


Note The higher the maximum number of services, the more memory the zone uses.


You can only define this parameter for policy templates that detect services: tcp_services, tcp_services_ns, udp_services, and other protocols. You cannot configure it for policy templates that relate to a specific service, such as dns_tcp, which relates to service 53, or for policy templates that relate to a specific traffic characteristic, such as fragments.

The Guard measures the traffic rate to the service according to the policy traffic characteristics. The traffic characteristic can be the source IP addresses, or the destination IP addresses. A policy that monitors to the service any measures the rate of source IP addresses on all services that are not handled by a specific policy, so it is less precise.

By limiting the service number, you can configure the Guard policies to your preferred traffic flow requirements.

To configure the maximum number of services, enter the following command in policy template configuration mode:

max-services max-services

The max-services argument is an integer greater than 1 that defines the maximum number of services that the Guard selects. We recommend that you do not exceed the maximum of 10 services.

The following example show how to configure the maximum number of services the Guard monitors to 5:

user@GUARD-conf-zone-scannet-policy_template-tcp_services# 
max-services 5

Configuring the Minimum Threshold

The minimum threshold parameter defines the minimum traffic volume for a service. When the threshold is exceeded, the Guard constructs policies that relate to the service traffic according to the particular traffic flow that exceeded the threshold.

You cannot configure this parameter for policy templates that are essential for proper zone protection and always construct a policy such as the following: tcp_services, tcp_services_ns, udp_services, other_protocols, http and fragments.

By setting the threshold, you can better adapt the protection operation to the traffic volume of the zone services.

To configure the minimum threshold, enter the following command in policy template configuration mode:

min-threshold min-threshold

The threshold argument is a real number (a floating point number with 2 decimal places), equal to or greater than 0, that defines the minimum threshold rate in pps. When measuring concurrent connections and SYN/FIN ratio, the threshold is an integer that defines the total number of connections.

The following example shows how to configure the minimum threshold of policy template http:

user@GUARD-conf-zone-scannet-policy_template-http# min-threshold 12.3

Configuring Policy Template States

The policy template state parameter defines whether the policy template is enabled or disabled. If you disable a policy template, it is prevented from producing policies when the Guard is in the policy construction phase.


Caution Disabling a policy template may seriously compromise zone protection. If you disable a policy template, the Guard cannot protect the zone from the traffic to which the policy template relates. For example, disabling the dns_udp policy template, prevents the Guard from creating zone policies that manage DNS (UDP) attacks.

To disable a policy template, use the disable command.

To enable a policy template, use the enable command.

Configuring All Policy Template Parameters Simultaneously

You can configure all policy template operational parameters with a single command by entering the following command:

policy-template policy-template-name max-services min-threshold {disabled | enabled}

Table 7-4 provides the arguments and keywords for the policy-template command.

Table 7-4 Arguments and Keywords for the policy-template Command 

Parameter
Description

policy-template-name

The policy template name. See Table 7-1 for more information.

max-services

The maximum number of services for which the Guard selects and constructs policies from the specific policy template.

To prevent the Guard from changing the current value, enter a value of -1.

See the "Configuring the Maximum Number of Services" section for more information.

min-threshold

The minimum threshold that must be exceeded for the Guard to rank the service.

To prevent the Guard from changing the current value, enter a value of -1.

See the "Configuring the Minimum Threshold" section for more information.

disabled

Disables the policy template from producing policies. See the "Configuring Policy Template States" section for more information.

enabled

Enables the policy template. See the "Configuring Policy Template States" section for more information.


The following example shows how to set the parameters of the tcp_services policy template. The maximum number of services is set to 3, the policy state is set to enabled, and the minimum threshold is unchanged (-1) and.

user@GUARD-conf-zone-scannet# policy-template tcp_services 3 -1 
enabled

Understanding Policy Path Sections

The policy path consists of the following sections:

Policy template

Service

Protection level

Packet types

Traffic characteristics

This section contains the following topics:

Policy Template

Service

Protection Level

Packet Types

Traffic Characteristics

Policy Template

A policy template is a collection of policy construction rules that the Guard uses during the policy construction phase to create the zone policies. See the "Understanding Policy Templates" section for more information.

Service

The service section defines the zone application port or protocol to which each policy relates. Policies have cross dependencies and priorities. If there are two policies that define the same traffic flow, the Guard analyzes the flow using the policy that is more specific. The service any relates to all traffic that does not specifically match other services created from the same policy template.

We recommend that you define specific policies for the zone main services to obtain protection that is most suited to your individual needs.


Caution Do not add the same service (port number) to more than one policy because it may decrease performance.

When you add or delete a service from the zone policies, the Guard marks the zone policies as untuned. If you enabled zone protection and the learning process, the Guard cannot detect anomalies in the zone traffic until you perform one of the following actions:

Perform the threshold tuning phase of the learning process and accept the results (see the "Tuning Thresholds" section)

Mark the zone policies tuned (see the ""Marking the Policies as Tuned" section)

This section includes the following topics:

Adding a Service

Deleting a Service

Adding a Service

You can add services to all policies that were created from a specific policy template. The new service is an addition to the services that were discovered during the policy construction phase and is defined with default values. You can define the threshold manually, yet we recommend that you run the threshold tuning phase of the learning process to tune the policies to the zone traffic. See the "Tuning Thresholds" section for more information.

You can add a new service to policies that were created from the following policy templates:

tcp_services, udp_services, tcp_services_ns

The service designates a port number.

other_protocols

The service designates a protocol number.


Note If you activate the policy construction phase after adding a service, new services might override the manually added service.


If you do not reissue policy construction, you may need to add a service manually in the following situations:

A new application or service was added to the zone network.

The policy construction phase was activated for a short period, so it does not reflect all the network services (for instance, in case there are known applications or services that are active only once a week or during the night).

To add a service, enter one of the following commands:

add-service service-num (in policy template configuration mode)

policy-template policy-template-name add-service service-num (zone configuration mode)

Table 7-5 provides the arguments for the add-service command.

Table 7-5 Arguments for the add-service Command 

Parameter
Description
policy-template-name

The policy template name. See Table 7-2 for more information.

service-num

The protocol or port number.


The following example shows how to add a service to all the policies that were created from the policy template tcp_services:

user@GUARD-conf-zone-scannet-policy_template-tcp_services# add-service 
25

Deleting a Service

You can delete a specific service for any policy template. The Guard will delete the service from all policies that were created from the specific policy template.

To delete a service, enter one of the following commands:

remove-service service-num (in policy template configuration mode)

policy-template policy-template-name remove-service service-num (in zone configuration mode)

Table 7-6 provides the arguments for the remove-service command.

Table 7-6 Arguments for the remove-service Command 

Parameter
Description
policy-template-name

The policy template name. See Table 7-2 for more information.

service-num

The protocol or port number to remove.



Caution If you delete a service, the Guard policies cannot monitor the traffic of that service, which may compromise zone protection.

You can remove services from the following policy templates:

tcp_services, udp_services, tcp_services_ns

The service is a port number.

other_protocols

The service is a protocol number.

If you do not activate the policy construction phase of the learning process you may need to remove a service manually in the following situations:

An application or service was removed from the network.

An application or service that you do not want to enable (because it is uncommon for the network environment) but was identified during the policy construction phase.


Note If you activate the policy construction phase after removing a service, the same service might be re-added.


The following example shows how to delete service from all policies that were created from the policy template tcp_services:

user@GUARD-conf-zone-scannet-policy_template-tcp_services# 
remove-service 25

Protection Level

The Guard applies three protection levels in which it applies different processes to the traffic flow. The Guard has the following three protection levels:

Analysis protection level—The Guard allows the traffic to flow monitored, but unhindered, during zone protection, as long as no anomalies are traced. Once the Guard traces anomalies it directs the traffic to the appropriate protection level.

Basic protection level—The Guard activates anti-spoofing and anti-zombie functions to authenticate the traffic by inspecting the suspicious traffic flow to verify its source. The Guard performs authentication for each host. The authentication is valid for a pre-defined period of time only and when the time expires, theGuard authenticates the host again.

Strong protection level—This Guard activates severe anti-spoofing functions that inspect the traffic flow packets to verify the flow legitimacy.The Guard performs authentication for each connection.

After activating a protection function, the Guard continues to analyze the traffic. If the Guard can still spot traffic abnormalities in traffic destined to the zone, it applies a stronger protection level.


Note Protection levels have a static configuration; they cannot be configured manually.


Packet Types

The Guard monitors packet characteristics, which can be one of the following:

Packet type (for example, TCP-SYN packets)

Packet analysis (for example, authenticated packets, packets that the Guard has verified their connection performing a TCP handshake)

Packet direction (for example, incoming connections)

Table 7-7 describes the packet types that the Guard monitors.

Table 7-7 Packet Types 

Packet Type
Brief Description

auth_pkts

Packets for which either a TCP handshake or UDP authentication was performed.

auth_tcp_pkts

Packets for which a TCP handshake was performed.

auth_udp_pkts

Packets for which UDP authentication was performed.

in_nodata_conns

Zone incoming connections that have no data transfer on the connection (packets without a data payload).

in_conns

Zone incoming connections.

in_pkts

Zone incoming DNS query packets.

in_unauth_pkts

Zone incoming unauthenticated DNS queries.

num_sources

Packets that have TCP source IP addresses that are destined to the zone and that have been authenticated by the Guard anti-spoofing functions.

out_pkts

Zone incoming DNS reply packets.

reqs

Request packets with data payload.

syns

Synchronization packets (TCP SYN flagged packets).

syn_by_fin

SYN and FIN flagged packets. The Guard verifies the ratio between the number of SYN flagged packets and the number of FIN flagged packets.

unauth_pkts

Packets that did not undergo TCP handshake.

pkts

All packet types that do not fall under any other category in the same protection level.


Traffic Characteristics

Traffic characteristics define how to analyze the traffic flow and what characteristics was used to aggregate the policies, so there can be different policies that analyze the same traffic flow but that measure the rate according to different characteristics, as shown in this example:

dns_tcp/53/analysis/pkts/dst_ip and dns_tcp/53/analysis/pkts/src_ip.

Table 7-8 describes the traffic characteristics that the Guard monitors.

Table 7-8 Traffic Characteristics 

Traffic Characteristic
Brief Description

dst_ip

Traffic destined to a zone IP address.

dst_ip_ratio

Ratio of SYN and FIN flagged packets destined to a specific IP address.

dst_port

Traffic destined to a specific zone port.

dst_port_ratio

Ratio of SYN and FIN flagged packets destined to a specific port.

global

Summation of all traffic flow as defined by the other policy sections.

protocol

Traffic destined to the zone aggregated according to protocol.

src_ip

Traffic destined to the zone aggregated according to source IP address.

src_ip_many_dst_ips

Traffic from a single IP address that probes a large number of zone IP addresses on the same port. This key is used for IP scanning.

src_ip_many_ports

Traffic from a single IP address that probes a large number of ports on a zone destination IP address. This key is used for port scanning.


Configuring Policy Parameters

After completing the learning process, you can display specific policy parameters to help you decide whether or not the policy parameters suit the zone traffic. If necessary, you can configure the policy parameters of a a single policy or a group of policies to adapt to zone traffic requirements.

To display the configuration of the policy parameters, use the show command in policy configuration mode.

To enter policy configuration mode, enter the following command in zone configuration mode:

policy policy-path

The policy-path argument specifies the policy path sections. The path can be a partial path that includes only part of the policy sections. See the "Using Policy Paths" section for more information.


Note To move up one level in the policy path hierarchy, enter policy .. at the policy path prompt.


The following example shows how to enter the dns_tcp/53/analysis/syns/global policy configuration mode:

user@GUARD-conf-zone-scannet# policy dns_tcp/53/analysis/syns/global 
user@GUARD-conf-zone-scannet-policy-/dns_tcp/53/analysis/syns/global#

You can configure the following parameters:

Policy state—See the "Changing the Policy State" section.

Policy threshold—See the "Configuring the Policy Threshold" section.

Policy timeout—See the "Configuring the Policy Timeout" section.

Policy action—See the "Configuring the Policy Action" section.

Policy interactive status—See the "Configuring the Policy Interactive Status" section.

You can change the policy action, timeout, threshold, and learning parameters at every section of the policy path. However, more policies are affected if you change these parameters at the higher-level policy sections (such as policy template or service sections). If you configure these parameters at a high-level policy path hierarchy, these parameters change in all the sub-policy paths.

You can use an asterisk (*) as a wildcard character in each policy path section. If you do not specify a policy path section, the Guard relates to the unspecified section as a wildcard (*).
For example, the policy: tcp_services//analysis//global.

Changing the Policy State

The zone policies have three possible states:

Active—The policy relates to the traffic and performs an action once the threshold is exceeded.

Inactive—The policy relates to the traffic and obtains the threshold, but it takes no action when a threshold is exceeded. You can inactivate a policy to avoid activating again the threshold-tuning phase of the learning process.

Disabled—The policy does not relate to the traffic flow, so no threshold is obtained. As a result, we recommend that you activate the threshold tuning phase of the learning process to ensure that the Guard monitors the correct thresholds for the policies.


Caution If you disable a policy, other policies regard its targeted traffic as belonging to them. We recommend that you activate the threshold tuning phase before you activate zone protection.

To change the policy state, enter the following command in policy configuration mode:

state {active | disabled | inactive}

The following example shows how to set the policy state:

user@GUARD-conf-zone-scannet-policy-/dns_tcp/53/analysis/syns# state 
disabled


Caution If you unnecessarily deactivate or disable a policy, the zone policies may not assume their role, and the zone protection can be compromised.

If you activate the policy construction phase after disabling a zone policy, all zone policies are reconfigured according to the current traffic flow and the policy may be reactivated.

Configuring the Policy Threshold

The policy threshold defines the threshold traffic rate for a specific policy and is adjusted by the threshold tuning phase and is set, by default, to a value that is appropriate for on-demand protection. When this threshold is exceeded, the policy takes action to protect the zone.

. The threshold is measured in pps except for policies that are constructed from the following policy templates:

num_soruces—The threshold is measured in number of IP addresses or ports.

tcp_connections—The threshold is measured in number of connections.

tcp_ratio—The threshold is measured as the ratio number.

You can configure the policy threshold in the following ways:

Set the threshold

You can set the value of the policy threshold. See the "Setting the Policy Threshold" section.

Multiply the threshold

The Guard multiplies the current policy thresholds by a factor. The new value may change in subsequent threshold tuning phases if you do not set it as fixed. See the "Multiplying a Threshold by a Factor" section.

Configure specific IP thresholds

The Guard sets thresholds for specific IP source address within the zone address range. See the "Configuring Specific IP Thresholds" section.

Configure a proxy threshold

The Guard sets a threshold for traffic of clients that connect to the zone in HTTP through proxies. See the "Configuring the Proxy-Threshold" section.

The policy threshold may change if you perform additional threshold tuning phases. You can modify the way a threshold may change in subsequent threshold tuning phases in the following ways:

Set the threshold as fixed

The Guard will not change the value of the policy threshold, proxy-threshold, and threshold-list in subsequent threshold tuning phases. See the "Setting the Threshold as Fixed" section.

Set a fixed multiplier for the policy threshold

The Guard calculates the policy threshold in subsequent threshold tuning phases based on the current policy threshold, the learned threshold, and the fixed multiplier. See the "Configuring a Threshold Multiplier" section.

Setting the Policy Threshold

To configure the policy threshold, enter the following command in policy configuration mode:

threshold threshold

The threshold argument is a positive number that specifies the policy threshold.

The following example shows how to set the threshold value of the policy dns_tcp/53/analysis/syns/global to 300:

user@GUARD-conf-zone-scannet-policy-/dns_tcp/53/analysis/syns/global# 
threshold 300

Setting the Threshold as Fixed

You can set a policy threshold, proxy-threshold, and threshold-list as fixed. The Guard ignores new thresholds in the threshold tuning phase of the learning process and maintains the current thresholds. Setting a threshold as fixed enables you to configure the thresholds of a policy but continue learning the thresholds of other policies.

To set a policy thresholds as fixed, enter the following command in policy configuration mode:

learning-params fixed-threshold

The following example shows how to set the threshold of the policy dns_tcp/53/analysis/syns/global as fixed:

user@GUARD-conf-zone-scannet-policy-/dns_tcp/53/analysis/syns/global# 
learning-params fixed-threshold

You can set the threshold of several policies as fixed in a single command by entering the command in zone configuration mode. To set a policy threshold as fixed in zone configuration mode, enter the following command:

policy policy-path learning-params fixed-threshold

The policy-path argument specifies the policy path. The path can be a partial path that includes only part of the policy sections. See the "Using Policy Paths" section for more information.

The following example shows how to the set the thresholds of all policies that were created from the dns_tcp policy template as fixed:

user@GUARD-conf-zone-scannet# policy dns_tcp learning-params 
fixed-threshold

To display the policy learning parameters, use the show learning-parameters command in policy configuration mode, or use the show policies policy-path learning-parameters command in zone configuration mode.

Configuring a Threshold Multiplier

You can set a multiplier for a policy threshold. The Guard will calculate the policy threshold by multiplying the learned threshold by the specified multiplier before accepting the result of subsequent threshold tuning phases. The Guard accepts the results of the threshold tuning phase using the configured threshold selection method. See the "Configuring the Threshold Selection Method" section.

To set a multiplier for the policy threshold, enter the following command in zone configuration mode:

policy policy-path learning-params threshold-multiplier threshold-multiplier

Table 7-9 provides the arguments for the policy learning-params threshold-multiplier command.

Table 7-9 Arguments for the policy learning-params threshold-multiplier Command 

Parameter
Description

policy-path

The policy path whose thresholds are multiplied. The path can be a partial path that includes only part of the policy sections. See the "Using Policy Paths" section for more information.

learning-params

Configures the learning parameters.

threshold-multiplier threshold-multiplier

A real positive number (a floating point number with 2 decimal places) by which the policy threshold is multiplied. Enter a number less than 1 to decrease the policy threshold.


To set a multiplier for the policy threshold in policy configuration mode, use the learning-params threshold-multiplier threshold-multiplier command.

The following example shows how to configure a threshold multiplier so that the Guard decreases in subsequent threshold tuning phases the thresholds of policies that were created from the policy template dns_tcp by half:

user@GUARD-conf-zone-scannet# policy dns_tcp learning-params 
threshold-multiplier 0.5

To display the policy learning parameters, use the show learning-parameters command in policy configuration mode, or use the show policies policy-path learning-parameters command in zone configuration mode.

Multiplying a Threshold by a Factor

You can multiply the thresholds of a policy or a group of policies by a factor, which enables you to increase or decrease the threshold of a policy or a group of policies if the traffic volume does not represent the zone traffic. You can enable the Guard to multiply the policy thresholds, the proxy thresholds, and the thresholds that were defined by the policy threshold-list command.

To multiply policy thresholds by a factor, enter the following command in zone configuration mode:

policy policy-path thresh-mult threshold-multiply-factor

Table 7-10 provides the arguments for the policy thresh-mult command.

Table 7-10 Arguments for the policy thresh-mult Command 

Parameter
Description
policy-path

The policy template name. See Table 7-2 for more information.

thresh-mult threshold-multiply-factor

A real positive number (a floating point number with 4 decimal places) to multiply the threshold by. Enter a number less than 1 to decrease the policy threshold.


The following example shows how to decrease the thresholds of policies that were created from the policy template dns_tcp by half:

user@GUARD-conf-zone-scannet# policy */*/*/*/src_ip thresh-mult 0.5

The Guard might change the threshold value in subsequent threshold tuning phases. To prevent the Guard from changing the threshold value, set the threshold value as fixed. See the "Setting the Threshold as Fixed" section.

To display the policy learning parameters, use the show learning-parameters command in policy configuration mode, or use the show policies policy-path learning-parameters command in zone configuration mode.

Configuring Specific IP Thresholds

You should consider configuring a specific IP threshold if one of the following situations occur:

When there is known high-volume traffic from an IP source, you can configure a threshold to apply to the specific IP source address.

When there is a non-homogenous zone (that is, a zone that has more than a single IP address defined) and there is known high-volume traffic to part of the zone only, you can configure a threshold to apply to the specific IP destination address.

You can configure specific IP thresholds only for the following policies:

Policies with traffic characteristic of destination IP (dst_ip).

Policies with traffic characteristics of source IP (src_ip) address that the default policy action is drop. The default policy action is the action that policy is applied when you create a new zone. You can configure the threshold list for such policies even if you change the policy action.

To configure a specific IP threshold, enter one of the following commands:

policy policy-path threshold-list ip threshold [ip threshold ...] (in zone configuration mode)

threshold-list ip threshold [ip threshold ...] (in policy configuration mode)

Table 7-11 provides the arguments for the threshold-list command.

Table 7-11 Arguments for the policy threshold-list Command 

Parameter
Description
policy-path

The policy template name. See Table 7-2 for more information.

ip

The specific IP address.

threshold

The threshold traffic rate in pps, except for policies measuring concurrent connections and SYN-by-FIN ratio, where the threshold is the number of connections.


You can add a maximum of 10 specific IP thresholds for each policy. You can enter all specific IP thresholds in a single command.

The Guard might change the policy thresholds in subsequent threshold tuning phases if the threshold selection method is set to new-thresholds. See the "Configuring the Threshold Selection Method" section for more information.

The following example shows how to set specific IP thresholds for IP addresses 10.10.10.2 and 10.10.15.2 for the policy http/80/analysis/syns/src_ip:

user@GUARD-conf-zone-scannet-policy-/http/80/analysis/syns/src_ip# 
threshold-list 10.10.10.2 500 10.10.15.2 500 

Configuring the Proxy-Threshold

The proxy threshold parameter defines the traffic rate for clients that connect to the zone in HTTP through proxies and enables the Guard and you to adapt the policy to traffic volumes that come from different sources. The Guard uses the proxy thresholds to block traffic only, so you can configure them only for policies in the DEFAULT zone template with a strong protection level and for policies in the TCP_NO_PROXY zone template with a basic protection level.

A proxy threshold is available for the http, http_ns, tcp_connections, and tcp_connections_ns policies only and is effective for tcp_connections or tcp_connections_ns policy templates if the zone has active http or http_ns policies only.

To configure the proxy-threshold, enter the following command in policy configuration mode:

proxy-threshold proxy-threshold

The proxy-threshold argument specifies the proxy-threshold traffic rate in pps for http and http_ns policies. It specifies the proxy-threshold in the number of connections for tcp_connections and tcp_connections_ns policies.

Because proxy servers typically handle much more traffic than network clients that are part of the zone, we recommend that when you configure a proxy threshold, you configure the proxy-threshold argument with a higher value than the threshold argument.

The following example shows how to set the proxy threshold for the policy tcp_ratio/any/basic/syn_by_fin/dst_ip_ratio to 20:

user@GUARD-conf-zone-scannet-policy-/tcp_ratio/any/basic/syn_by_fin/ 
dst_ip_ratio# proxy-threshold 20

Configuring the Policy Timeout

The timeout parameter defines the minimum time for dynamic filters that are produced by the policy to apply their action.

When the timeout expires, the Guard runs a procedure to determine whether or not to deactivate the dynamic filters that were produced by the policy. If the Guard decides not to deactivate the dynamic filters, the filter activation timeout resumes for another time span. To change the criteria for dynamic filter deactivation, use the filter-termination command. See the "Deactivating Dynamic Filters" section for more information.

To configure the policy timeout, enter the following command in policy configuration mode:

timeout {forever | timeout}

Table 7-12 provides the arguments and keywords for the timeout command.

Table 7-12 Arguments and Keywords for the timeout Command 

Parameter
Description
forever

Indefinite time span.

timeout

An integer from 1 to 3,000,000 that specifies the minimum time that the dynamic filters, which are produced by the policy, are active.


To change the timeout of a group of policies simultaneously, use the policy set-timeout command in zone configuration mode.

Configuring the Policy Action

The action parameter defines the type of action the policy takes once its threshold is exceeded. To configure the policy action, enter the following command in policy configuration mode:

action policy-action

Table 7-13 describes the policy actions.

Table 7-13 Policy Action 

Policy Action
Description

block-unauthenticated

Adds a filter that blocks traffic that was not authenticated by the anti-spoofing functions, such as an ACK with no prior handshake.

filter/strong

Adds a filter that applies the strong protection level to the traffic flow.

to-user-filters

Adds a filter directing the traffic to the user filters.

filter/drop

Adds a filter that directs the Guard to drop the specified traffic.

redirect/zombie

Adds a filter that enhances authentication for all user filters with an action of redirect.

notify

Notifies you when its threshold is exceeded.


To change the action of a group of policies simultaneously, use the policy set-action command in zone configuration mode.


Note Not all actions are valid for all policies. If you modify the policy action to an action that is not valid for the specific policy, the Guard displays an error message.


The following example shows how to set the action of all policies that relate to dns_tcp:

user@GUARD-conf-zone-scannet# policy dns_tcp/ set-action filter/drop 
set action of dns_tcp/ to filter/drop: 
16 policy actions set.

Configuring the Policy Interactive Status

The interactive status parameter defines the interactive status that the pending dynamic filters, which are created by the zone policy, will assume. The interactive status applies only to zones if you enable zone protection, and the zone is in interactive protect mode. See "Using Interactive Protect Mode" for more information.

To modify the status of the policy pending dynamic filters if you have set the interactive status of a recommendation to always-accept or always-ignore, use the interactive-status command.

For example, if you have defined the status of a recommendation to always-accept, the recommendation and the pending dynamic filters of the recommendation are no longer displayed. To ignore the recommendation or the pending dynamic filters that the recommendation produces, change the policy interactive status to interactive or always-accept.

To configure the policy interactive status, enter the following command in policy configuration mode:

interactive-status {always-ignore | always-accept | interactive}

Table 7-14 provides the keywords for the interactive-status command.

Table 7-14 Keywords for the interactive-status Command 

Parameter
Description

always-accept

Accepts the dynamic filters that the policy produces automatically. The action applies automatically whenever the policy produces new recommendations.

The Guard does not display these recommendations.

always-ignore

Ignores the dynamic filters that the policy produces automatically. The policy does not produce recommendations when its threshold is exceeded.

The Guard does not display these recommendations.

interactive

Waits for you to accept or ignore the dynamic filters that the policy produces.

The Guard displays these dynamic filters as part of the recommendations.


The following example shows how to configure the interactive status of policy dns_tcp/53/analysis/pkts/src_ip to always-accept:

user@GUARD-conf-zone-scannet-policy-/dns_tcp/53/analysis/pkts/src_ip# 
interactive-status always-accept

Monitoring Policies

You can monitor the policies to see how well they are suited to the zone traffic volume and services.

This section describes the following topics:

Displaying Policies

Displaying Policy Statistics

Displaying Policies

You can display the zone policies to verify that they are adapted to the zone traffic characteristics. You might want to view the zone constructed policies to verify that these policies are customized for the zone traffic characteristics. You can configure only policies that appear in this list.

The Guard displays only current zone policies. If a policy template was disabled during the policy construction phase, the Guard does not create policies from that policy template, and you do not see these policies when you enter the show policies command.

To view the zone policies, enter the following command in zone configuration mode:

show policies policy-path

The policy-path argument specifies a group of policies. You can use an asterisk (*) as a wildcard character in each policy path section. If you do not specify a policy path section, the Guard relates to the unspecified section as a wildcard (*). For example, the policy: tcp_services//analysis//global.
To display the statistics of all policies, enter an asterisk (*) for the policy-path.
See the "Using Policy Paths" section for more information.

Table 7-15 provides a description of the fields in the show policies command output.

Table 7-15 Field Descriptions of the show policies Command
Output 

Field
Description

Policy

Specifies the policy name. See the "Using Policy Paths" section for more information.

State

Specifies the policy state. See the "Changing the Policy State" section for more information.

act = active, inact = inactive, disab= disabled

IStatus

Specifies the policy interactive status. See the "Configuring the Policy Interactive Status" section for more information.

a-accept = always-accept, a-ignor = always-ignore,
interac = interactive

Threshold

Specifies the policy threshold. When this threshold is exceeded, the Guard takes action to protect the zone. See the "Configuring the Policy Threshold" section for more information.

Proxy

Specifies the policy proxy-threshold. See the "Configuring the Proxy-Threshold" section for more information.

List

Specifies the number of specific IP thresholds defined for the policy. See the "Configuring Specific IP Thresholds" section for more information.

Action

Specifies the action that the policy takes when the threshold is exceeded. See the "Configuring the Policy Action" section for more information.

Timeout

Specifies the minimum time span that the policy action is valid. The Guard determines, according to the filter-termination thresholds, whether or not the dynamic filter that was produced by the policy is to be inactivated. See the "Configuring the Policy Timeout" section for more information.


Displaying Policy Statistics

You can display the rate of the traffic flowing through a zone policy or a group of zone policies. You can determine whether the type of services and volume represent the zone traffic. The Guard displays the traffic flows forwarded to the zone, with the highest rates as measured by the policies. The rate is calculated based on traffic samples.

To display the policy statistics, enter the following command in zone configuration mode:

show policies policy-path statistics [num-entries]

Table 7-16 provides the arguments for the show policies statistics command output.

Table 7-16 Arguments for the show policies statistics Command 

Parameter
Description
policy-path

Specifies a group of policies for which to display statistics. To display the statistics of all policies, enter an asterisk (*). You can use an asterisk (*) as a wildcard character in each policy path section. If you do not specify a policy path section, the Guard relates to the unspecified section as a wildcard (*).

policy-path (continued)

For example, the policy: tcp_services//analysis//global.

To display the statistics of all policies, enter an asterisk (*) for the policy-path.

See the "Using Policy Paths" section for more information.

num-entries

Specifies the number of entries to display. Enter a number from 1 to 100. The Guard displays the policies with the highest values.


The Guard displays the information in three tables. The information in each table is sorted by value, with the highest values appearing at the top.

Table 7-17 displays the fields in the tables in the show policies statistics command output.

Table 7-17 Field Descriptions of the show policies statistics Command Output Tables 

Column
Description
Fields in all output tables

Key

Specifies the key, which is the traffic characteristic that was used to aggregate the policies.

For example, in the tcp_services/any/analysis/syns/dst_ip policy, the key is the destination IP address (dst_ip). If the traffic characteristic that was used to aggregate the policies is global, the key displays N/A.

See Table 7-7 for more information.

Policy

Specifies the policy name.

See the "Using Policy Paths" section for more information.

Fields in one of the output tables

Rate

Specifies the rate of the traffic that flows through the policy and is measured in pps. The rate is calculated based on traffic samples.

Connection

Specifies the number of concurrent connections.

This information is available for tcp_connections policies and for the following packet types:

in_conns—For the strong protection level

in_nodata_conns—For the analysis protection level

Ratio

Specifies the ratio between the number of SYN flagged packets and the number of FIN/RST flagged packets. This information is available for syn_by_fin policies only.



Note The Guard does not display tables that contain no data.


Using Snapshots to Verify the Results of the Learning Process

You can save a snapshot of the learning parameters (services, thresholds, and other policy-related data) at any stage during the learning process, and you can review it later. You can compare the learning parameters of two zones or compare two of the zone snapshots to verify the outcome of the learning process and trace differences in policies, services, and thresholds.

We recommend that you save a snapshot every few hours during the learning process. If an attack occurs during the learning process, you can use the snapshot policies for the zone. You can take the snapshot manually or configure the Guard to automatically take a snapshot at specified intervals. The Guard saves up to 100 snapshots for each zone. New snapshots replace the previous ones.

You can copy zone policies from the snapshot to configure the zone according to previous learning results if necessary.

This section provides information on the following topics:

Creating Snapshots

Comparing Learning Results

Displaying Snapshots

Copying Policies

Creating Snapshots

You can save a single snapshot of the zone learning parameters or configure the Guard to automatically take a snapshot at specified intervals. The Guard continues the learning process while the snapshot is taken.

To set the Guard to automatically take a snapshot at specified intervals, see the "Configuring Periodic Actions" section for more information.

To save a single snapshot of the zone learning parameters, enter the following command in zone configuration mode:

snapshot [threshold-selection {new-thresholds | max-thresholds | cur-thresholds | weighted calc-weight}]

Table 7-18 provides the arguments and keywords for the snapshot command.

Table 7-18 Arguments and Keywords for the snapshot Command 

Parameter
Description

threshold-selection

Sets the method the Guard uses to calculate the snapshot thresholds. By default, the Guard uses the zone threshold-selection method that is defined by the learning-params threshold-selection command. The default zone threshold-selection method is max-thresholds.

new-thresholds

Saves the results of the leaning process to the zone configuration.

max-thresholds

Compares the current policy threshold to the learned threshold, and saves the higher of the two to the zone configuration.

This is the default method.

weighted calc-weight

Calculates the policy thresholds to save based on the following formula:

threshold = ((new-threshold * calc-weight + current-threshold * (100 - calc-weight)) / 100

cur-thresholds

Ignores the new thresholds of the learning process and saves the current policy thresholds to the snapshot. You can use this method for backup purposes.


The snapshot command saves the results of the zone learning process. The results include the zone policies, services, and thresholds. After you have verified the snapshot parameters and compared two snapshots or copied the snapshot parameters to a new zone, you can delete the snapshot.

You can back up the current zone policies at all times by using the snapshot threshold-selection cur-thresholds command.

This example shows how to create a snapshot in which the thresholds are the highest value between the current policy threshold and the new threshold of the learning process:

user@GUARD-conf-zone-scannet# snapshot threshold-selection 
max-thresholds

To save a single snapshot in global mode, use the snapshot zone-name [threshold-selection {new-thresholds | max-thresholds | cur-thresholds | weighted weight}] command.

To delete a snapshot, use the no snapshot command.

Comparing Learning Results

You can compare the learning results of two snapshots or two zones to trace differences in policies, services, and thresholds.

This section includes the following topics:

Comparing Snapshots

Comparing Zones

Comparing Snapshots

To compare two snapshots, enter the following command in zone configuration mode:

diff snapshots snapshot-id snapshot-id [percent]

Table 7-19 provides the arguments for the diff command.

Table 7-19 Arguments for the diff Command 

Parameter
Description
snapshot-id

ID of the snapshot with learning parameters that are to be compared. To display a list of the zone snapshots, use the show snapshots command.

percent

(Optional) Tracing threshold value. The Guard traces any policy threshold parameters that differ between the two snapshots for more than this specified threshold value. The default percentage is 100%, where the Guard traces all differences between the two snapshots.


The following example shows how to display the zone snapshots and compare the two most recent snapshots:

user@GUARD-conf-zone-scannet# show snapshots
ID   Time
1    Feb 10 10:32:04
2    Feb 10 10:49:12
3    Feb 10 11:01:50
user@GUARD-conf-zone-scannet# diff 2 3

To compare snapshots in global mode, use the diff zone-name snapshots snapshot-id snapshot-id [percent] command.

Comparing Zones

To compare the learning parameters of two zones, enter the following command in global mode or in configuration mode:

diff zone-name zone-name [percent]

Table 7-20 provides the arguments for the diff command.

Table 7-20 Arguments for the diff Command 

Parameter
Description
zone-name

The names of the zones with learning parameters that are to be compared.

percent

(Optional) Tracing threshold value. The Guard traces any policy threshold parameters that differ between the two zones for more than this specified threshold value. The default percentage is 100%, where the Guard traces all differences between the two zones.


The following example shows how to compare the learning parameters of two zones:

user@GUARD# diff scannet scannet-mailserver

Displaying Snapshots

You can display a list of the zone snapshots or the snapshot parameters to get a comprehensive view of the zone learning results.

To display the zone snapshots, enter the following command:

show snapshots [snapshot-id [policies policy-path]]

Table 7-21 provides the arguments and keywords for the show snapshots command.

Table 7-21 Arguments and Keywords for the show snapshots
Command 

Parameter
Description

snapshots

Displays the zone snapshots. If you do not specify the snapshot ID, the default is to display a list of all zone snapshots.

snapshot-id

The ID of the snapshot with learning parameters that are to be displayed. If you do not specify policies, the default is to display a list of all the zone snapshots. To view the snapshot ID use the show snapshots command.

policy-path

Specifies a group of policies to display. See the "Using Policy Paths" section for more information.


To compare snapshots, in global mode, use the show zone zone-name snapshots [snapshot-id [policies policy-path]] command.

The following example shows how to display a list of the zone snapshots, and then display the policies that relate to dns_tcp of snapshot 2:

user@GUARD-conf-zone-scannet# show snapshots
ID   Time
1    Feb 10 10:32:04
2    Feb 10 10:49:12
user@GUARD-conf-zone-scannet# show snapshots 2 policies dns_tcp

The fields of the show zone zone-name snapshots snapshot-id policies policy-path command output are identical to the fields in the output of the show policies command. See the "Displaying Policies" section for more information.

Table 7-22 describes the fields in the show snapshots command output.

Table 7-22 Field Descriptions for show snapshots
Command Output 

Field
Description
ID

The snapshot ID.

Time

The date and time the snapshot was taken.


Copying Policies

You can copy a complete policy configuration or a partial configuration to the current zone.

You can copy the following information:

Copy services—You can copy services from a source zone to the zone, which allows you to configure the zone policies without applying the policy construction phase to discover these services. Before you copy services to the zone, verify that the zones have similar traffic patterns.

Copy policy parameters—You can replace the zone policy parameters with the policy parameters of one of the zone snapshots, which allows you to revert back to prior learning results. The Guard copies parameters of existing policies only.

To copy the zone policies, enter the following command in zone configuration mode:

copy-policies {snapshot-id | src-zone-name [service-path]}

Table 7-23 provides the arguments and keywords for the copy-policies command.

Table 7-23 Arguments and Keywords for the copy-policies
Command 

Parameter
Description
snapshot-id

The ID of the snapshot whose policies are copied. To view the snapshot ID, use the show snapshots command.

src-zone-name

The name of the zone whose service policies are copied.

service-path

The desired service to be copied. A service path can have one of the following formats:

policy-template—Copies all policies that relate to the policy template.

policy-template/service-num—Copies all policies that relate to the policy template and the specified service.

The default is to copy all policies and services.


The following example shows how to copy all services that relate to the policy template tcp_connections from the zone webnet to the current zone, scannet:

user@GUARD-conf-zone-scannet# copy-policies webnet tcp_connections/ 

The following example shows how to display a list of the zone snapshots and then copy the policies from the snapshot with ID 2:

user@GUARD-conf-zone-scannet# show snapshots
ID   Time
1    Feb 10 10:32:04
2    Feb 10 10:49:12
user@GUARD-conf-zone-scannet# copy-policies 2 

Backing Up Policy Configuration

You can back up the current zone policies at all times by using the snapshot threshold-selection cur-thresholds command.

The following example shows how to create a snapshot to back up the current policy configuration:

user@GUARD-conf-zone-scannet# snapshot threshold-selection 
cur-thresholds