Cisco IOS XR Virtual Firewall Command Reference, Release 3.7
Policy Map Commands

Table Of Contents

Policy Map Commands on the Virtual Firewall

appl-parameter http advanced-options

class

clear service-policy

connection advanced-options

deny

deny (ftp)

description (policy map)

inspect

mask-reply

match content (policy map)

match content length (policy map)

match content-type-verification

match header (policy map)

match header length (policy map)

match header mime-type (policy map)

match port-misuse (policy map)

match request-method (policy map)

match request-method (ftp policy map)

match strict-http

match transfer-encoding (policy map)

match url (policy map)

match url length (policy map)

nat dynamic

nat static

permit

permit (http)

policy-map multi-match

policy-map type inspect ftp

policy-map type inspect http

policy-map type management

reset

service-policy

show service-policy


Policy Map Commands on the Virtual Firewall


This module describes the policy map commands. Policy map commands allow you to configure a policy map that defines the different actions applied to traffic passing through the VFW application. The VFW application attempts to match multiple classes within the policy map to allow a multifeature policy map. The VFW application executes the action for only one matching class within each of the class sets. The definition of which classes are in the same class set depends on the actions applied to the classes; the VFW application associates each policy map action with a specific set of classes.


Note The commands described in this module are SanOS (Linux) commands used on the VFW application. Before you can access any of these commands, you must attach from the route processor to the VFW application using the service firewall attach location command. For more information, see the "Attaching to the VFW Application" section in Cisco IOS XR Virtual Firewall Configuration Guide.


appl-parameter http advanced-options

To associate an HTTP parameter map with a Layer 3 and Layer 4 policy map, use the appl-parameter http advanced-options command in policy map class configuration mode. To disassociate the HTTP parameter map as an action from the policy map, use the no form of this command.

appl-parameter http advanced-options name

no appl-parameter http advanced-options name

Syntax Description

name

Name of an existing HTTP parameter map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The appl-parameter http advanced-options command associates an HTTP parameter map with a Layer 3 and Layer 4 policy map. A parameter map is a means to combine related actions for use in a Layer 3 and Layer 4 HTTP policy map. Parameter maps are defined using the parameter-map type http command.

Examples

The following example shows how to specify the appl-parameter http advanced-options command as an action for the policy map:

firewall/Admin(config)# policy-map multi-match L4SLBPOLICY 
firewall/Admin(config-pmap)# class FILTERHTTP 
firewall/Admin(config-pmap-c)# appl-parameter http advanced-options http_param_map1 

Related Commands

Command
Description

policy-map multi-match

Creates a Layer 3 and Layer 4 policy map and enters policy map configuration mode.

parameter-map type

Creates a connection, HTTP, or SSL type parameter map.


class

To associate a class map with a policy map, use the class command in the appropriate policy map configuration mode. To remove an associated class map from a policy map, use the no form of this command.

class {class_name [insert-before class2] | class-default}

no class {class_name [insert-before class2]}

Syntax Description

class_name

Name of a previously defined traffic class configured with the class-map command. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

insert-before name2

(Optional) Places the current named class map ahead of an existing class map or inline match condition specified by the name2 argument in the policy-map configuration. The VFW application does not save the sequence reordering as part of the configuration. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

class-default

Associates the reserved, well-known class map created by the VFW application. You cannot delete or modify this class. All traffic that fails to meet the other matching criteria in the named class map belongs to the default traffic class. If none of the specified classifications match the traffic, then the VFW application performs the action specified under the class class-default command. The class-default class map has an implicit match any statement in it enabling it to match all traffic.


Defaults

No default behavior or values

Command Modes

Policy map configuration
Policy map FTP inspection configuration
Policy map HTTP inspection configuration
Management policy map configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The class specified by the class_name argument represents a previously defined traffic class configured with the class-map command. Refer to the "Class Map Commands on the Virtual Firewall" module for more information regarding the class-map command. If you are configuring a Layer 3 and Layer 4 policy map, use Layer 3 and Layer 4 class maps. If you are configuring a Layer 7 policy map, use appropriate Layer 7 class maps. If you are configuration a management policy map, use management class maps.

Examples

The following example shows how to associate a Layer 3 and Layer 4 class map with a Layer 3 and Layer 4 policy map:

firewall/Admin(config)# policy-map multi-match L4_SLB_POLICY 
firewall/Admin(config-pmap) #class L4_SLB_CLASS 
firewall/Admin(config-pmap-c)#

The following example shows how to associate a Layer 7 HTTP inspection class map with a Layer 7 HTTP inspection policy map:

host/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# class HTTP_INSPECT_L7CLASS 
firewall/Admin(config-pmap-ins-http-c)# 

The following example shows how to associate a Layer 7 FTP inspection class map with a Layer 7 FTP inspection policy map:

host/Admin(config)# policy-map type inspect ftp first-match FTP_INSPECT_L7POLICY 
host/Admin(config-pmap-ftp-ins)# class FTP_INSPECT_L7CLASS 
firewall/Admin(config-pmap-ftp-ins-c)# 

The following example shows how to associated a management class map with a management policy map:

firewall/Admin(config)# policy-map type management first-match L4_REMOTE_MGMT_ALLOW_POLICY 
firewall/Admin(config-pmap-mgmt)# class SSH-ALLOW_CLASS 

Related Commands

Command
Description

policy-map multi-match

Creates a Layer 3 and Layer 4 policy map and enters policy map configuration mode.

policy-map type inspect ftp

Creates an FTP command request inspection policy map and enters policy map FTP inspection configuration mode.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

policy-map type management

Creates a Layer 3 and Layer 4 network management policy map and enters the policy map management configuration mode.


clear service-policy

To clear the service policy statistics, use the clear service-policy command.

clear service-policy policy_name

Syntax Description

policy_name

Name of an existing policy map that is currently in service (applied to an interface).


Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the interface feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Examples

The following example shows how to clear the statistics for the service policy HTTP1:

firewall/Admin# clear service-policy HTTP1

Related Commands

Command
Description

show service-policy

Displays the statistics for service policies enabled globally within a context or on a specific interface.


connection advanced-options

To associate a connection parameter map with a Layer 3 and Layer 4 policy map, use the connection advanced-options command in policy map class configuration mode. To disassociate the parameter map from a policy map, use the no form of this command.

connection advanced-options name

no connection advanced-options name

Syntax Description

name

Name of an existing connection parameter map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the connection feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the parameter-map type connection command to create a connection paramter map. For details about configuring a connection parameter map, see the "Configuring TCP/IP Normalization and IP Reassembly Parameters on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Examples

The following example shows how to associate the connection parameter map IP_MAP with a Layer 3 and Layer 4 TCP/IP policy map:

firewall/Admin(config)# policy-map multi-match TCPIP_POLICY 
firewall/Admin(config-pmap)# class TCP_CLASS 
firewall/Admin(config-pmap-c)# connection advanced-options IP_MAP 

Related Commands

Command
Description

parameter-map type

Creates a connection, HTTP, or SSL type parameter map.


deny

To deny management traffic specified in the associated Layer 3 and Layer 4 management class map, use the deny command in the Layer 3 and Layer 4 management policy map class configuration mode. To return to the default state and permit all management traffic to pass, use the no form of this command.

deny

no deny

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map management class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the admin feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the deny command to deny management traffic specified in the management class map.

Examples

The following example shows how to deny the traffic specified in the class map named SSH_CLASS:

firewall/Admin(config-pmap-mgmt)# class SSH_CLASS 
firewall/Admin(config-pmap-mgmt-c)# deny 

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.


deny (ftp)

To deny the FTP request commands specified in a class map or specified in an inline match command, use the deny command in the appropriate policy map FTP inspection configuration mode. To return to the default state and permit all FTP request commands to pass, use the no form of this command.

deny

no deny

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map FTP inspection class configuration
Policy map FTP inspection match configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the deny command to deny the FTP request commands by resetting the FTP session. By default, the VFW application allows all FTP commands to pass.

Examples

The following example shows how to instruct the VFW application to deny the FTP request commands specified in the Layer 7 FTP inspection class map by resetting the FTP session:

firewall/Admin(config)# policy-map type inspect ftp first-match FTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ftp-ins)# class FTP_INSPECT_L7CLASS 
firewall/Admin(config-pmap-ftp-ins-c)# deny 

The following example shows how to instruct the VFW application to deny the FTP request commands specified in an inline Layer 7 policy map match command by resetting the FTP session:

firewall/Admin(config)# policy-map type inspect ftp first-match FTP_INSPECT_L7POLICY 
host/Admin(config-pmap-ftp-ins)# match FTP_REQUEST_MATCH request-method mkdir 
host/Admin(config-pmap-ftp-ins-m)# deny

description (policy map)

To provide a brief summary about policy map, use the description command in the appropriate policy map configuration mode. To remove the description from the class map, use the no form of this command.

description text

no description

Syntax Description

text

Description for the policy map. Enter an unquoted text string with a maximum of 240 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy map configuration
Policy map FTP inspection configuration
Policy map HTTP inspection configuration
Management policy map configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command has no user role restrictions. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Examples

The following example shows how to add a description that the class map is to perform Layer 3 and Layer 4 inspection:

firewall/Admin(config)# policy-map multi-match L4_POLICY
firewall/Admin(config-cmap)# description Policy map for L3/L4 inspection

Related Commands

Command
Description

policy-map multi-match

Creates a Layer 3 and Layer 4 policy map and enters policy map configuration mode.

policy-map type inspect ftp

Create an FTP command request inspection policy map and enters policy map FTP inspection configuration mode.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

policy-map type management

Creates a Layer 3 and Layer 4 network management policy map and enters the policy map management configuration mode.


inspect

To define the Layer 3 and Layer 4 HTTP deep packet inspection, FTP command inspection, or application protocol inspection policy actions, use the inspect command in policy map class configuration mode. To remove an associated class map from a policy map, use the no form of this command.

inspect {dns [maximum-length bytes]} | {ftp [strict policy policy_map1]} | {http [policy policy_map2 | url-logging]} | {icmp [error]} | rtsp

no inspect {dns [maximum-length bytes]} | {ftp [strict policy policy_map1]} | {http [policy policy_map2 | url-logging]} | {icmp [error]} | rtsp

Syntax Description

dns

Enables Domain Name System (DNS) query inspection. DNS requires application inspection so that DNS queries will not be subject to the generic UDP handling based on activity timeouts. Instead, the UDP connections associated with DNS queries and responses are torn down as soon as a reply to a DNS query has been received. The VFW application performs the reassembly of DNS packets to verify that the packet length is less than the configured maximum length.

maximum-length bytes

(Optional) Sets the maximum length of a DNS reply. Valid entries are 64 to 65536 bytes.

ftp

Enables File Transfer Protocol (FTP) inspection. The VFW application inspects FTP packets, translates address and port embedded in the payload, and opens up secondary channel for data.

strict

(Optional) Checks for protocol RFC compliance and prevents web browsers from sending embedded commands in FTP requests. The strict keyword prevents an FTP client from determining valid usernames that are supported on an FTP server. When an FTP server replies to the USER command, the VFW application intercepts the 530 reply code from the FTP server and replaces it with the 331 reply code. Specifying an FTP inspection policy allows selective command filtering and also prevent the display of the FTP server system type to the FTP client. The VFW application intercepts the FTP server 215 reply code and message to the SYST command, then replaces the text following the reply code with Xs.

policy policy_map1

Specifies the name assigned to a previously created Layer 7 FTP command inspection policy map to implement the inspection of Layer 7 FTP commands by the VFW application. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters. Use the inspect ftp command in policy map class configuration mode to define the FTP command request inspection policy.

Note If you do not specify a Layer 7 policy map, the VFW application performs a general set of Layer 3 and Layer 4 FTP protocol fixup actions.

http

Enables enhanced Hypertext Transfer Protocol (HTTP) inspection on the HTTP traffic. The inspection checks are based on configured parameters in an existing Layer 7 policy map and internal RFC compliance checks performed by the VFW application. By default, the VFW application allows all request methods.

policy policy_map2

(Optional) Specifies the name assigned to a previously created Layer 7 HTTP application inspection policy map to implement the deep packet inspection of Layer 7 HTTP application traffic by the VFW application. The inspection checks are based on configured parameters in an existing Layer 7 policy map and internal RFC compliance checks performed by the VFW application. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

Note If you do not specify a Layer 7 policy map, the VFW application performs a general set of Layer 3 and Layer 4 HTTP protocol fixup actions and internal RFC compliance checks.

url-logging

(Optional) Enables the monitoring of Layer 3 and Layer 4 traffic. This function logs every URL request that is sent in the specified class of traffic, including the source or destination IP address and the URL that is accessed.

icmp

Enables Internet Control Message Protocol (ICMP) payload inspection. ICMP inspection allows ICMP traffic to have a "session" so it can be inspected similarly to TCP and UDP traffic.

error

(Optional) Performs a NAT of ICMP error messages. The VFW application creates translation sessions for intermediate or endpoint nodes that send ICMP error messages based on the NAT configuration. The VFW application overwrites the packet with the translated IP addresses.

rtsp

Enables Real Time Streaming Protocol (RTSP) packet inspection. RTSP is used by RealAudio, RealNetworks, Apple QuickTime 4, RealPlayer, and Cisco IP/TV connections. The VFW application monitors Setup and Response (200 OK) messages in the control channel established using TCP port 554 (no UDP support).


Defaults

The default for the maximum length is 512 bytes.

Command Modes

Policy map class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the inspect command to define the Layer 3 and Layer 4 HTTP deep packet inspection, FTP command inspection, or application protocol inspection policy actions. Application inspection involves the examination of protocols such as DNS, FTP, HTTP, ICMP, and RTSP to verify the protocol behavior and identify unwanted or malicious traffic passing through the VFW application.

To perform the deep packet inspection of Layer 7 HTTP application traffic by the VFW application, first create a Layer 7 HTTP deep packet inspection policy using the policy-map type inspect http command (see the "Configuring Application Protocol Inspection on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide). You nest the Layer 7 deep packet inspection policy using the Layer 3 and Layer 4 inspect http command. If you do not specify a Layer 7 HTTP policy map, the VFW application performs a general set of Layer 3 and Layer 4 HTTP protocol fixup actions and internal RFC compliance checks.

To perform checks for protocol RFC compliance and to prevent web browsers from sending embedded commands in FTP requests, first create a Layer 7 FTP policy using the policy-map type inspect ftp command (see the "Configuring Application Protocol Inspection on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide). You nest the Layer 7 FTP inspection traffic policy using the Layer 3 and Layer 4 inspect ftp command. If you do not specify a Layer 7 FTP policy map, the VFW application performs a general set of Layer 3 and Layer 4 FTP protocol fixup actions.

Examples

The following example shows how to specify the inspect http command as an action for an HTTP application protocol inspection policy map:

firewall/Admin(config)# policy-map multi-match HTTP_INSPECT_L4POLICY 
firewall/Admin(config-pmap)# class HTTP_INSPECT_L4CLASS 
firewall/Admin(config-pmap-c)# inspect http policy HTTP_DEEPINSPECT_L7POLICY 

Related Commands

Command
Description

policy-map type inspect ftp

Create an FTP command request inspection policy map and enters policy map FTP inspection configuration mode.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.


mask-reply

To instruct the VFW application to mask the reply to the FTP SYST command by filtering sensitive information from the command output, use the mask-reply command in policy map FTP inspection class configuration mode. To disable the masking of the system reply to the FTP SYST command, use the no form of this command.

mask-reply

no mask-reply

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map FTP inspection class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The mask-reply command is applicable only to the FTP SYST command and its associated reply. The SYST command is used to find out the type of operating system at the FTP server.

Examples

The following example shows how to instruct the VFW application to mask the reply to the FTP SYST command:

firewall/Admin(config)# policy-map type inspect ftp first-match FTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ftp-ins)# class FTP_INSPECT_L7CLASS 
firewall/Admin(config-pmap-ftp-ins-c)# mask-reply 

match content (policy map)

To configure the Layer 7 HTTP inspection policy map to define HTTP application inspection decisions based on content expressions contained within the HTTP entity-body, use the match content command in policy map HTTP inspection configuration mode. To clear content expression-checking match criteria from the policy map, use the no form of this command.

match name content expression [offset number] [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

expression

Content expression contained within the HTTP entity-body. The range is from 1 to 255 alphanumeric characters. Table 4 provides a list of the supported characters that you can use in regular expressions.

offset number

(Optional) Provides an absolute offset where the content expression search string starts. The offset starts at the first byte of the Message body, after the empty line (CR,LF,CR,LF) between the headers and the body of the message. The offset value is between 1 to 4000 bytes.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match content command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then define the action to use if a match is made. Options are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

The VFW application supports the use of regular expressions for matching. Expressions are stored in a header map in the form header-name: expression. Header expressions allow spaces, provided that the spaces are escaped or quoted. Table 4 provides a list of the supported characters that you can use in regular expressions.

Table 4 Special Characters for Matching String Expressions 

Convention
Description

.

One of any character.

.*

Zero or more of any character.

\.

Period (escaped).

[charset]

Match any single character from the range.

[^charset]

Do not match any character in the range. All other characters represent themselves.

()

Expression grouping.

(expr1 | expr2)

OR of expressions.

(expr)*

0 or more of expression.

(expr)+

1 or more of expression.

expr{m,n}

Repeat the expression between m and n times, where m and n have a range of 1 to 255.

expr{m}

Match the expression exactly m times. The range for m is from 1 to 255.

expr{m,}

Match the expression m or more times. The range for m is from 1 to 255.

\a

Alert (ASCII 7).

\b

Backspace (ASCII 8).

\f

Form-feed (ASCII 12).

\n

New line (ascii 10).

\r

Carriage return (ASCII 13).

\t

Tab (ASCII 9).

\v

Vertical tab (ASCII 11).

\0

Null (ASCII 0).

\\

Backslash.

\x##

Any ASCII character as specified in two-digit hexadecimal notation.


Examples

The following example shows how to specify a content expression contained within the entity-body sent with an HTTP request:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH1 content .*newp2psig 
firewall/Admin(config-pmap-ins-http-m)

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match content length (policy map)

To configure the Layer 7 HTTP inspection policy map to define application inspection decisions in the HTTP content up to the configured maximum content parse length, use the match content length command in policy map HTTP inspection configuration mode. To clear the HTTP content length match criteria from the policy map, use the no form of this command.

match name content length operator bytes1 [bytes2] [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

operator

Comparison that is to be made against the HTTP content parse length. Allowable operators are as follows:

lt—Less than

gt—Greater than

eq—Equal to

neq—Not equal to

range—An inclusive range of size values

bytes [bytes2]

Numeric value to compare to the HTTP content parse length. Valid entries are from 1 to 65535 bytes. The bytes2 argument is used for the range operator.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Messages that meet the specified criteria are either allowed or denied based on the Layer 7 HTTP deep packet inspection policy map action.

When you use the match content length command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

Examples

The following example shows how to define application inspection decisions in the HTTP content up to the configured maximum content parse length:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH2 content length eq 3495 
firewall/Admin(config-pmap-ins-http-m)

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match content-type-verification

To verify the content MIME-type messages with the header MIME-type, use the match content-type-verification command in policy map HTTP inspection configuration mode. To clear the MIME-type match criteria from the policy map, use the no form of this command.

match name content-type-verification [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match content-type-verification command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

The match content-type-verification command limits the MIME types in HTTP messages allowed through the VFW application. It verifies that the header MIME-type value is in the internal list of supported MIME types and the header MIME-type matches the actual content in the data or entity body portion of the message. If they do not match, the VFW application performs the specified Layer 7 policy map action: permit or reset.

The MIME-type HTTP inspection process requires a search of the entity body of the HTTP message, which may degrade performance of the VFW application.

Examples

The following example shows how to verify the content MIME-type messages with the header MIME-type:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH3 content-type-verification 
firewall/Admin(config-pmap-ins-http-m)

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match header (policy map)

To define HTTP deep packet inspection decisions based on the name and value in an HTTP header, use the match header command in policy map HTTP inspection configuration mode. To clear an HTTP header match criteria from the policy map, use the no form of this command.

match name header {header_name | header_field} header-value expression [insert-before map_name]

no match name header

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

header_name

Name of the HTTP header to match (for example, www.example1.com.) The range is from 1 to 64 alphanumeric characters.

Note The header_name argument cannot include the colon in the name of the HTTP header; the VFW application rejects the colon as an invalid token.

header_field

Standard HTTP/1.1 header field. Valid selections include request-header fields, general-header fields, and entity-header field. Table 5 lists the supported HTTP/1.1 header fields.

header-value expression

Specifies the header value expression string to compare against the value in the specified field in the HTTP header. The range is from 1 to 255 alphanumeric characters. For a list of supported characters that you can use in regular expressions, see Table 4.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match header command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Table 5 lists the supported HTTP/1.1 header fields.

Table 5 HTTP/1.1 Header Fields 

Field Name
Description

Accept

A semicolon-separated list of representation schemes (content type metainformation values) that will be accepted in the response to the request.

Accept-Charset

The character sets are acceptable for the response. This field allows clients capable of understanding more comprehensive or special-purpose character sets to signal that capability to a server that can representing documents in those character sets.

Accept-Encoding

Restricts the content encoding that a user will accept from the server.

Accept-Language

The ISO code for the language in which the document is written. The language code is an ISO 3316 language code with an optional ISO639 country code to specify a national variant.

Authorization

Specifies that the user agent wants to authenticate itself with a server, usually after receiving a 401 response.

Cache-Control

Directives that must be obeyed by all caching mechanisms along the request/response chain. The directives specify behavior intended to prevent caches from adversely interfering with the request or response.

Connection

Allows the sender to specify connection options.

Content-MD5

An MD5 digest of the entity-body that provides an end-to-end integrity check. Only a client or an origin server can generate this header field.

Expect

Used by a client to inform the server about what behaviors the client requires.

From

Contains the e-mail address of the person that controls the requesting user agent.

Host

The Internet host and port number of the resource being requested, as obtained from the original uniform resource identifier (URI) given by the user or referring resource. The Host field value must represent the naming authority of the origin server or gateway given by the original URL.

If-Match

Used with a method to make it conditional. A client that has one or more entities previously obtained from the resource can verify that one of those entities is current by including a list of their associated entity tags in the If-Match header field. The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource. As a special case, the value "*" matches any current entity of the resource.

Pragma

Pragma directives understood by servers to whom the directives are relevant. The syntax is the same as for other multiple-value fields in HTTP, for example, the accept field, a comma-separated list of entries, for which the optional parameters are separated by semicolons.

Referer

The uniform resource identifier (URI) or address of the resource from which the URI in the request was obtained.

Transfer-Encoding

Indicates what (if any) type of transformation has been applied to the message body to safely transfer it between the sender and the recipient.

User-Agent

Information about the user agent; for example, a software program originating the request. This information is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations.

Via

Used by gateways and proxies to indicate the intermediate protocols and recipients between the user agent and the server on requests, and between the origin server and the client on responses.


To define HTTP deep packet inspection decisions based on the name and value in an HTTP header, use the match header command. The VFW application performs regular expression matching against the received packet data from a particular connection based on the HTTP header expression. The VFW application supports the use of regular expressions for matching. Expressions are stored in a header map in the form header-name: expression. Header expressions allow spaces, provided that the spaces are escaped or quoted. For a list of supported characters that you can use in regular expressions, see Table 4.

Examples

The following example shows how to filter on content and allow HTTL headers that contain the expression html:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH4 header accept header-value html 
firewall/Admin(config-pmap-ins-http-m)

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match header length (policy map)

To limit the HTTP traffic allowed through the VFW application based on the length of the entity body in the HTTP message, use the match header length command in policy map HTTP inspection configuration mode. To clear an HTTP header length match criteria from the policy map, use the no form of this command.

match name header length {request | response} operator bytes1 [bytes2] [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

request

Specifies the size of the HTTP header request message that can be received by the VFW application.

response

Specifies the size of the HTTP header response message sent by the VFW application.

operator

Comparison that is to be made against the length of the entity body in the HTTP message. Allowable operators are as follows:

lt—Less than

gt—Greater than

eq—Equal to

neq—Not equal to

range—An inclusive range of size values

bytes [bytes2]

Numeric value to compare to the length of the entity body in the HTTP message. Valid entries are from 1 to 65535 bytes. The bytes2 argument is used for the range operator.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

By default, the maximum header length for HTTP deep packet inspection is 2048 bytes. To limit the HTTP traffic allowed through the VFW application based on the length of the entity body in the HTTP message, use the match header length command. Messages are either allowed or denied based on the Layer 7 HTTP deep packet inspection policy map action. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Examples

The following example shows how to specify that the policy map match on HTTP traffic received with a length less than or equal to 3600 bytes in the entity body of the HTTP message:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-cmap-http-insp)# match MATCH4 header length request eq 3600 
firewall/Admin(config-pmap-ins-http-m)

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match header mime-type (policy map)

To specify a subset of the Multipurpose Internet Mail Extension (MIME)-type messages that the VFW application permits or denies based on the actions in the policy map, use the match header mime-type command in policy map HTTP inspection configuration mode. To deselect the specified MIME message match criteria from the policy map, use the no form of this command.

match name header mime-type mime_type [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

mime-type mime_type

Specifies the MIME type. The VFW application includes a predefined list of MIME types, such as image\Jpeg, text\html, application\msword, audio\mpeg. Choose whether only the MIME types included in this list are permitted through the VFW application firewall or whether all MIME types are acceptable. The default behavior is to allow all MIME types. Table 6 lists the supported MIME types.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match header mime-type command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Use the match header mime-type command to specify a subset of the Multipurpose Internet Mail Extension (MIME)-type messages that the VFW application permits or denies based on the actions in the policy map. MIME-type validation extends the format of Internet mail to allow non-US-ASCII textual messages, nontextual messages, multipart message bodies, and non-US-ASCII information in message headers. Table 6 lists the supported MIME types.

Table 6 Supported MIME Types

application\msexcel

application\mspowerpoint

application\msword

application\octet-stream

application\pdf

application\postscript

application\x-gzip

application\x-java-archive

application\x-java-vm

application\x-messenger

application\zip

audio\*

audio\basic

audio\midi

audio\mpeg

image\x-portable-bitmap

image\x-portable-greymap

image\x-xpm

text\*

text\css

text\html

text\plain

text\richtext

text\sgml

text\xmcd

text\xml

video\*

video\flc

video\mpeg

video\quicktime

video\sgi

video\x-fli

audio\x-adpcm

audio\x-aiff

audio\x-ogg

audio\x-wav

image\*

image\gif

image\jpeg

image\png

image\tiff

image\x-3ds

image\x-bitmap

image\x-niff


MIME-type validation extends the format of Internet mail to allow non-US-ASCII textual messages, nontextual messages, multipart message bodies, and non-US-ASCII information in message headers.

Examples

The following example shows how to specify that the policy map permits MIME-type audio/midi messages through the VFW application:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH5 header mime-type audio\midi 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match port-misuse (policy map)

To define HTTP deep packet inspection compliance decisions that restrict certain HTTP traffic from passing through the VFW application, use the match port-misuse command in policy map HTTP inspection configuration mode. To clear the HTTP restricted application category match criteria from the policy map, use the no form of this command.

match name port-misuse {im | p2p | tunneling} [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

im

Defines the instant messaging application category. The VFW application checks for the Yahoo Messenger instant messaging application.

p2p

Defines the peer-to-peer application category. The applications checked include Kazaa and Gnutella.

tunneling

Defines the tunneling application category. The applications checked include HTTPort/HTTHost, GNU Httptunnel, and Firethru.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The policy map detects the misuse of port 80 (or any other port running HTTP) for tunneling protocols such as peer-to-peer (p2p) applications, tunneling applications, and instant messaging.

When you use the match port-misuse command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

The port misuse application inspection process requires a search of the entity body of the HTTP message, which may degrade performance of the VFW application.

The VFW application disables the match port-misuse command by default. If you do not configure a restricted HTTP application category, the default action by the VFW application is to allow the applications without generating a log.

Examples

The following example shows how to specify that the policy map identifies peer-to-peer applications as restricted HTTP traffic:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH6 port-misuse p2p 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match request-method (policy map)

To define HTTP deep packet inspection compliance decisions based on the request methods defined in RFC 2616 and by HTTP extension methods, use the match request-method command in policy map HTTP inspection configuration mode. To clear the HTTP request method match criteria from the policy map, use the no form of this command.

match name request-method {ext method | rfc method} [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

ext method

Specifies an HTTP extension method. If the RFC request messages does not contain one of the RFC 2616 HTTP request methods, the VFW application verifies if it is an extension method. The VFW application supports the inspection of the following HTTP request extension methods: copy, edit, getattr, getattrname, getprops, index, lock, mkdir, move, revadd, revlabel, revlog, revnum, save, setattr, startrev, stoprev, unedit, and unlock.

rfc method

Specifies an RFC 2616 HTTP request method that you want to perform an RFC compliance check on. The VFW application supports the inspection of the following RFC 2616 HTTP request methods: connect, delete, get, head, options, post, put, and trace

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match request-method command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

For unsupported HTTP request methods, include the inspect command as an action in the Layer 3 and Layer 4 policy map.

The VFW application disables the match request-method command by default. If you do not configure a request method, the default action by the VFW application is to allow the RFC 2616 HTTP request method without generating a log.

Examples

The following example shows how to specify that the policy map identifies the index HTTP RFC 2616 protocol for application inspection:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH7 request-method ext index 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match request-method (ftp policy map)

To configure a Layer 7 FTP inspection policy map to define FTP command inspection decisions performed by the VFW application, use the match request-method command in policy map FTP inspection configuration mode. To clear the FTP inspection request method from the policy map, use the no form of this command.

match name request-method ftp_command

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

ftp_command

FTP command to be subjected to FTP inspection by the VFW application. The FTP commands include:

appe—Append to a file

cdup—Change to the parent of the current directory

dele—Delete a file at the server side

get—Retrieve a file

help—Help information from the server

mkd—Create a directory

put—Store a file

rmd—Remove a directory

rnfr—Rename from

rnto—Rename to

site—Specify server-specific command

stou—Store a file with a unique name

syst—Get system information


Defaults

No default behavior or values

Command Modes

Policy map FTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The match request-method command identifies the FTP command that you want filtered by the VFW application. The prompt changes from (config-pmap-ftp-ins) to (config-pmap-ftp-ins-m).

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, you can only use one inline match command in a policy map. If you require more match criteria, use a traffic class.

Use the deny or mask-reply commands to define the action for the match request-method command.

Examples

The following example shows how to add an inline match command to a Layer 7 FTP command policy map:

host/Admin(config-pmap-ftp-ins)# match FTP_REQUEST_MATCH request-method mkdir 
host/Admin(config-pmap-ftp-ins-m)# 

Related Commands

Command
Description

deny

Denies management traffic specified in the associated Layer 3 and Layer 4 management class map.

mask-reply

Instructs the VFW application to mask the reply to the FTP SYST command by filtering sensitive information from the command output.


match strict-http

To ensure that the internal compliance checks verify message compliance with the HTTP RFC standard, RFC 2616, use the match strict-http command in policy map HTTP inspection configuration mode. To clear the HTTP RFC standard, RFC 2616 match criteria from the policy map, use the no form of this command.

match name strict-http [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match strict-http command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Use the match strict-http command to ensure that the internal compliance checks verify message compliance with the HTTP RFC standard, RFC 2616. If the HTTP message is not compliant, the VFW application permits or resets the specified HTTP traffic based on the policy map action.

Examples

The following example shows how to configure the policy map to ensure that the internal compliance checks verify message compliance with the HTTP RFC standard, RFC 2616:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH8 strict-http 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match transfer-encoding (policy map)

To define HTTP deep packet inspection decisions that limit the HTTP transfer-encoding types that can pass through the VFW application, use the match transfer-encoding command in policy map HTTP inspection configuration mode. To clear the HTTP transfer-encoding type match criteria from the policy map, use the no form of this command.

match name transfer-encoding coding_types [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

transfer-encoding coding_types

Specifies the HTTP transfer-encoding type for the class map. The possible values for coding_types include:

chunked—Message body is transferred as a series of chunks.

compress—The encoding format produced by the common UNIX file compression program "compress". This format is an adaptive Lempel-Ziv-Welch coding (LZW).

deflate—The .zlib format defined in RFC 1950 in combination with the deflate compression mechanism described in RFC 1951

gzip—An encoding format produced by the file compression program gzip (GNU zip) as described in RFC 1952. This format is a Lempel-Ziv coding (LZ77) with a 32-bit CRC.

identity—The default (identity) encoding, which does not require the use of transformation.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match transfer-encoding command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

The transfer-encoding general-header field indicates the type of transformation, if any, that has been applied to the HTTP message body to safely transfer it between the sender and the recipient. When an HTTP request message contains the configured transfer-encoding type, the VFW application performs the configured action in the policy map.

Each match transfer-encoding command configures a single application type.

The VFW application disables the match transfer-encoding command by default.

Examples

The following example shows how to configure the policy map to specify a chunked HTTP transfer encoding type to limit the HTTP traffic that flows through the VFW application:

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH9 transfer-encoding chunked 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match url (policy map)

To define HTTP deep packet inspection decisions based on URL name and, optionally, HTTP method, use the match url command in policy map HTTP inspection configuration mode. To remove the URL name or HTTP method match criteria from the policy map, use the no form of this command.

match name url expression [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

expression

URL, or portion of a URL, to match. The URL string range is from 1 to 256 characters. Include only the portion of the URL following www.hostname.domain in the match statement.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match url command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Include only the portion of the URL following www.hostname.domain in the match statement. For example, in the URL www.anydomain.com/latest/whatsnew.html, include only /latest/whatsnew.html. To match the www.anydomain.com portion, the URL string can take the form of a URL regular expression. The VFW application supports the use of regular expressions for matching. For a list of the supported characters that you can use in regular expressions, see Table 4.

When matching URLs, keep in mind that the period "." character does not have a literal meaning in regular expressions. Use either the "[]" or "\" character classes to match this symbol, for example, specify "www[.]xyz[.]com" instead of "www.xyz.com".

Examples

The following example shows how to configure the policy map to define application inspection decisions based on a URL, enter

firewall/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match url whatsnew/latest.* 
firewall/Admin(config-pmap-ins-http-m)#

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


match url length (policy map)

To limit the HTTP traffic allowed through the VFW application by specifying the maximum length of a URL in a request message that can be received by the VFW application, use the match url length command in policy map HTTP inspection configuration mode. To clear a URL length match criteria from the policy map, use the no form of this command.

match name url length operator bytes [bytes2] [insert-before map_name]

no match name

Syntax Description

name

Name of the inline match condition. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.

operator

Comparison that is to be made against the maximum length of a URL in a request message. Allowable operators are as follows:

lt—Less than

gt—Greater than

eq—Equal to

neq—Not equal to

range—An inclusive range of size values

bytes [bytes2]

Numeric value to compare to the maximum length of a URL in a request message. Valid entries are from 1 to 65535 bytes. The bytes2 argument is used for the range operator.

insert-before map_name

(Optional) Places the inline match command ahead of an existing class map in the policy map configuration.


Defaults

No default behavior or values

Command Modes

Policy map HTTP inspection configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

When you use the match url length command, you access the policy map inspection HTTP match configuration mode and the prompt changes from (config-pmap-ins-http) to (config-pmap-ins-http-m). You can then specify the actions that the VFW application should take when network traffic matches the specified inline match command. Possible actions are permit or reset.

A match command can be included in a policy map in place of using a traffic class containing comparible match commands. However, when you use a match command in the policy map, you can specify an action for only a single match statement in the policy map.

Examples

The following example shows how to specify that the class map is to match on a URL with a length less than or equal to 10000 bytes in the request message:

firewall/Admin(config)# class-map type http inspect HTTP_INSPECT_L7POLICY 
firewall/Admin(config-cmap-http-insp)# match url length eq 10000 

Related Commands

Command
Description

permit

Allows the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

policy-map type inspect http

Creates an HTTP deep packet inspection policy map and enters policy map inspection HTTP configuration mode.

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


nat dynamic

To configure dynamic NAT and PAT as an action in a policy map, use the nat dynamic command in policy map class configuration mode. To remove a dynamic NAT action from a policy map, use the no form of this command.

nat dynamic nat_id interface interface_name

no nat dynamic nat_id interface interface_name

Syntax Description

nat dynamic nat_id

Refers to a global pool of IP addresses that exists under the interface. Dynamic NAT translates a group of local source IP addresses to a pool of global IP addresses that are routable on the destination network. All packets going from the interface attached to the traffic policy have their source address translated to one of the available addresses in the global pool. Enter an integer from 1 to 2147483647.

interface interface_name

Specifies the interface name of an existing interface for which you are configuring NAT.


Defaults

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the NAT feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the nat dynamic command to configure dynamic NAT and PAT as an action in a policy map. The VFW application applies the dynamic NAT from the interface attached to the traffic policy (through the service-policy command in interface configuration mode) to the interface specified in the nat dynamic command.

If a packet egresses an interface that you have not configured for NAT, the VFW application transmits the packet untranslated.

Examples

The following example shows how to specify the nat dynamic command as an action for a dynamic NAT policy map:

firewall/Admin(config)# policy-map multi-action NAT_POLICY 
firewall/Admin(config-pmap)# class NAT_CLASS 
firewall/Admin(config-pmap-c)# nat dynamic 1 interface xyz 

Related Commands

Command
Description

nat static

Configures static NAT and static port redirection in a policy map.


nat static

To configure static NAT and static port redirection in a policy map, use the nat static command in policy map class configuration mode. To remove a NAT action from a policy map, use the no form of this command.

nat static ip_address netmask mask [tcp eq | udp eq] port interface if_name

no nat static ip_address netmask mask [tcp eq | udp eq] port interface if_name

Syntax Description

ip_address

IP address for a single static translation. This argument establishes the globally unique IP address of a host as it appears to the outside world. The policy map performs the global IP address translation for the source IP address specified in the ACL (as part of the class map traffic classification).

netmask mask

Specifies the subnet mask for the IP address. Enter a subnet mask in dotted-decimal notation.

tcp eq

Specifies that the port argument is a TCP port name or number.

port

Global TCP or UDP port for static port redirection. Enter an integer from 0 to 65535. A value of 0 instructs the VFW application to match any port. Alternatively, you can enter a protocol keyword that corresponds to a TCP port number. See Table 7 for a list of supported well-known TCP port names and numbers.

udp eq port3

Specifies that the port argument is a UDP port name or number.

interface if_name

Specifies the interface for the global IP address.


Defaults

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the NAT feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the nat static command to configure static NAT and static port redirection in a policy map. Static NAT lets you identify local traffic for address translation by specifying the source and destination addresses in an extended ACL which is referenced as part of the class map traffic classification. The VFW application applies static NAT from the interface attached to the traffic policy (through the service-policy command in interface configuration mode) to the interface specified in the nat static command.

Table 7 provides a list of supported well-known TCP and UDP port names and numbers.

Table 7 Well-known TCP and UDP Port Names and Numbers

Well-Known TCP Port Numbers and Keywords
Keyword
Port Number
Description

ftp

21

File Transfer Protocol

http

80

Hyper Text Transfer Protocol

https

443

HTTP over TLS/SSL

irc

194

Internet Relay Chat

matip-a

350

Mapping of Airline Traffic over Internet Protocol (MATIP) Type A

nntp

119

Network News Transport Protocol

pop2

109

Post Office Protocol v2

pop3

110

Post Office Protocol v3

rtsp

554

Real-time Stream Control Protocol

smtp

25

Simple Mail Transfer Protocol

telnet

23

Telnet

Well-Known UDP Port Numbers and Keywords

dns

53

Domain Name System

wsp

9200

Connectionless Wireless Session Protocol (WSP)

wsp-wtls

9202

Secure Connectionless WSP

wsp-wtp

9201

Connection-based WSP

wsp-wtp-wtls

9203

Secure Connection-based WSP


Examples

The following example shows how to specify the nat command as an action for a static NAT and port redirection policy map:

firewall/Admin(config)# policy-map multi-action NAT_POLICY 
firewall/Admin(config-pmap)# class NAT_CLASS 
firewall/Admin(config-pmap-c)# nat static 192.168.12.15 255.255.255.0 8080 interface xyz 

Related Commands

Command
Description

nat dynamic

Configures dynamic NAT and PAT as an action in a policy map.


permit

To allow the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application, use the permit command in the Layer 3 and Layer 4 management policy map class configuration mode. To disallow the specified IP network management protocols to be received by the VFW application, use the no form of this command.

permit

no permit

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map management class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the admin feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the permit command to allow the IP network management protocols listed in the associated Layer 3 and Layer 4 management class map to be received by the VFW application.

Examples

The following example shows how to permit the specified IP network management protocol by the VFW application:

firewall/Admin(config-pmap-mgmt)# class SSH_CLASS 
firewall/Admin(config-pmap-mgmt-c)# permit 

Related Commands

Command
Description

deny

Denies management traffic specified in the associated Layer 3 and Layer 4 management class map.


permit (http)

To allow the specified HTTP traffic to be received by the VFW application if it passes the HTTP deep packet inspection match criteria specified in the class map or an inline match condition, use the permit command in the appropriate policy map inspection HTTP configuration mode. To disallow the specified HTTP traffic to be received by the VFW application, use the no form of this command.

permit

no permit

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map inspection HTTP match configuration
Policy map inspection HTTP class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

By default, HTTP inspection allows traffic that does not match any of the configured Layer 7 HTTP deep packet inspection matches. You can modify this behavior by including the class class-default command with the reset action to deny the specified Layer 7 HTTP traffic. In this case, if none of the class matches configured in the Layer 7 HTTP deep packet inspection policy map are hit, the class-default action is taken by the VFW application. For example, you can include a class map to allow the HTTP GET method and use the class class-default command to block all the other requests.


Note By default, all matches are applied to both HTTP request and response messages, but the class class-default command is only applied to HTTP requests.


Examples

The following example shows how to allow the specified HTTP traffic to be received by the VFW application if the match criteria are met:

firewall/Admin(config)# policy-map inspect http all-match HTTP_DEEPINSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH5 transfer-encoding chunked 
firewall/Admin(config-pmap-ins-http-m)# permit

The following example shows how to allow the specified HTTP traffic to be received by the VFW application if the class map match criteria in class map L7HTTP_CHECK are met:

firewall/Admin(config)# policy-map inspect http all-match HTTP_DEEPINSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# class L7HTTP_CHECK 
firewall/Admin(config-pmap-ins-http-c)# permit 

Related Commands

Command
Description

reset

Denies the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection.


policy-map multi-match

To create a Layer 3 and Layer 4 policy map and access policy map configuration mode, use the policy-map multi-match command in configuration mode. When you access the policy map configuration mode, the prompt changes to (config-pmap). To remove a Layer 3 and Layer 4 policy map from the VFW application, use the no form of this command.

policy-map multi-match map_name

no policy-map multi-match map_name

Syntax Description

map_name

Name assigned to the Layer 3 and Layer 4 policy map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect, NAT, or connection feature in your user role, depending on the type of policy map you want to configure. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

For a Layer 3 and Layer 4 traffic classification, you create Layer 3 and Layer 4 policy maps with actions that configure:

Static or dynamic Network Address Translation (NAT)

Application protocol inspection (also known as protocol fixup)

TCP termination, normalization, and re-use

IP normalization and fragment reassembly

To perform HTTP deep packet inspection or FTP command inspection functions, you associate a previously created Layer 7 policy map within a Layer 3 and Layer 4 policy map to provide an entry point for the traffic classification. Layer 7 policy maps are considered to be child policies and can be associated only within a Layer 3 and Layer 4 policy map. Only a Layer 3 and Layer 4 policy map can be activated on an interface; a Layer 7 policy map cannot be applied directly on an interface.

The VFW application supports a system-wide maximum of 4096 policy maps.

Examples

The following example shows how to create a Layer 3 and Layer 4 application protocol inspection policy map named L4_HTTP_APP_INSPECTION_POLICY:

firewall/Admin(config)# policy-map multi-match L4_HTTP_APP_INSPECTION_POLICY
firewall/Admin(config-pmap)#

Related Commands

Command
Description

class-map

Creates a Layer 3 and Layer 4 class map and enters class map configuration mode.


policy-map type inspect ftp

To create an FTP command request inspection policy map and access policy map FTP inspection configuration mode, use the policy-map type inspect ftp command in configuration mode. When you access the policy map FTP inspection configuration mode, the prompt changes to (config-pmap-ftp-ins). To remove an FTP command request inspection policy map from the VFW application, use the no form of this command.

policy-map type inspect ftp first-match map_name

no policy-map type inspect ftp first-match map_name

Syntax Description

first-match

Specifies that the VFW application executes only the action specified against the first matching classification.

map_name

Name assigned to the Layer 7 FTP command request class map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

You associate the Layer 7 FTP command request inspection policy map within a Layer 3 and Layer 4 policy map to provide an entry point for the traffic classification. Layer 7 policy maps are considered to be child policies and can be associated only within a Layer 3 and Layer 4 policy map. Only a Layer 3 and Layer 4 policy map can be activated on an interface; a Layer 7 policy map cannot be applied directly on an interface.

To associate the Layer 7 FTP inspection policy map, you nest it using the Layer 3 and Layer 4 inspect command.

Examples

The following example shows how to create a Layer 7 FTP command inspection policy map:

host/Admin(config)# policy-map type inspect ftp first-match FTP_INSPECT_L7POLICY 
host/Admin(config-pmap-ftp-ins) #

Related Commands

Command
Description

class-map type ftp inspect

Creates and configures a Layer 7 class map to be used for the inspection of FTP request commands and enters class map FTP inspection configuration mode.


policy-map type inspect http

To create an HTTP deep packet inspection policy map and access policy map inspection HTTP configuration mode, use the policy-map type inspect http command in configuration mode. When you access the policy map inspection HTTP configuration mode, the prompt changes to (config-pmap-ins-http). To remove an HTTP deep packet inspection policy map from the VFW application, use the no form of this command.

policy-map type inspect http all-match map_name

no policy-map type inspect http all-match map_name

Syntax Description

all-match

Specifies that the VFW application tries to match all other classifications even after it found the first match.

map_name

Name assigned to the Layer 7 HTTP deep packet inspection policy map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

You associate the Layer 7 HTTP deep packet inspection policy map within a Layer 3 and Layer 4 policy map to provide an entry point for the traffic classification. Layer 7 policy maps are considered to be child policies and can be associated only within a Layer 3 and Layer 4 policy map. Only a Layer 3 and Layer 4 policy map can be activated on an interface; a Layer 7 policy map cannot be applied directly on an interface.

To associate the Layer 7 HTTP inspection policy map, you nest it using the Layer 3 and Layer 4 inspect command.

Examples

The following example shows how to create a Layer 7 HTTP deep packet inspection policy map:

host/Admin(config)# policy-map type inspect http all-match HTTP_INSPECT_L7POLICY 
host/Admin(config-pmap-ins-http)#

Related Commands

Command
Description

class-map type http inspect

Creates a Layer 7 HTTP deep packet inspection class map and enters class map HTTP inspection configuration mode.


policy-map type management

To create a Layer 3 and Layer 4 network management policy map and access the policy map management configuration mode, use the policy-map type management command in configuration mode. To remove a Layer 3 and Layer 4 network management policy map from the VFW application, use the no form of this command.

policy-map type management first-match map_name

no policy-map type management first-match map_name

Syntax Description

first-match

Specifies that the VFW application executes only the action specified against the first matching classification.

map_name

Name assigned to the Layer 3 and Layer 4 network management policy map. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Use the policy-map type management command to create a Layer 3 and Layer 4 network management policy map and access the policy map management configuration mode. You can classify network traffic based on the following management protocols: HTTP, HTTPS, ICMP, SNMP, SSH, or Telnet. When you access this mode, the prompt changes to (config-pmap-mgmt).

Examples

The following example shows how to create a Layer 3 and Layer 4 network traffic management policy map:

firewall/Admin(config)# policy-map type management first-match L4_REMOTE_MGMT_ALLOW_POLICY 
firewall/Admin(config-pmap-mgmt)#

Related Commands

Command
Description

class-map type management

Create a Layer 3 and Layer 4 class map to classify the IP network management traffic received by the VFW application and enters class map management configuration mode.


reset

To deny the specified HTTP traffic by sending a TCP reset message to the client or server to close the connection, use the reset command in the appropriate policy map inspection HTTP configuration mode. To allow the specified HTTP traffic to be received by the VFW application, use the no form of this command.

reset

no reset

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Policy map inspection HTTP match configuration
Policy map inspection HTTP class configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the inspect feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

By default, HTTP inspection allows traffic that does not match any of the configured Layer 7 HTTP deep packet inspection matches. You can modify this behavior by including the class class-default command with the reset action to deny the specified Layer 7 HTTP traffic. In this case, if none of the class matches configured in the Layer 7 HTTP deep packet inspection policy map are hit, the class-default action is taken by the VFW application. For example, you can include a class map to allow the HTTP GET method and use the class class-default command to block all the other requests.


Note By default, all matches are applied to both HTTP request and response messages, but the class class-default command is only applied to HTTP requests.


Examples

The following example shows how to deny the specified HTTP traffic to be received by the VFW application if the match criteria are met:

firewall/Admin(config)# policy-map inspect http all-match HTTP_DEEPINSPECT_L7POLICY 
firewall/Admin(config-pmap-ins-http)# match MATCH5 transfer-encoding chunked 
firewall/Admin(config-pmap-ins-http-m)# reset 

The following example shows how to deny the specified HTTP traffic to be received by the VFW application if the class map match criteria in class map L7HTTP_CHECK are met:

firewall/Admin(config)# policy-map inspect http all-match HTTP_DEEPINSPECT_L7POLICY
firewall/Admin(config-pmap-ins-http)# class http_check
firewall/Admin(config-pmap-ins-http-c)# reset

Related Commands

Command
Description

permit (http)

Allows the specified HTTP traffic to be received by the VFW application if it passes the HTTP deep packet inspection match criteria specified in the class map or an inline match condition.


service-policy

To apply a previously created policy map and attach the traffic policy to a specific interface or globally to all interfaces in the same context, use the service-policy command in configuration mode or interface configuration mode. To remove a service policy, use the no form of this command.

service-policy input policy_name

no service-policy input policy_name

Syntax Description

input

Specifies that the traffic policy is to be applied to the input direction.

policy_name

Name of a previously defined policy map, configured with a previously created policy-map command. Enter a text string with a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Configuration
Interface configuration

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command requires the interface feature in your user role. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

Note the following when attaching a service policy:

Policy maps, applied globally in a context, are internally applied on all interfaces existing in the context.

You can apply the policy in an input direction only.

A policy activated on an interface overwrites any specified global policies for overlapping classification and actions.

The VFW application allows only one policy of a specific feature type to be activated on a given interface.

Examples

The following example shows how to apply the L4SLBPOLICY policy map to an interface:

firewall/C1(config-if-mgmt)# service-policy input L4SLBPOLICY 

The following example shows how to remove the L4SLBPOLICY policy map from the interface:

firewall/C1(config-if-mgmt)# no service-policy input L4SLBPOLICY 

Related Commands

Command
Description

show service-policy

Displays the statistics for service policies enabled globally within a context or on a specific interface.


show service-policy

To display the statistics for service policies enabled globally within a context or on a specific interface, use the show service-policy command in EXEC mode.

show service-policy policy_name [detail]

Syntax Description

policy_name

Identifier of an existing policy map that is currently in service (applied to an interface) as an unquoted text string with a maximum of 64 alphanumeric characters.

detail

(Optional) Displays a more detailed listing of policy map statistics and status information.


Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

Release 3.5.0

This command was introduced on the multiservice blade (MSB) for the Cisco XR 12000 Series Router.

Release 3.6.0

No modification.

Release 3.7.0

No modification.


Usage Guidelines

This command has no user role feature restrictions. For details about role-based access control (RBAC) and user roles, see the "Configuring Virtualization on the Virtual Firewall" module in Cisco IOS XR Virtual Firewall Configuration Guide.

The show service-policy command displays the following information:

Interface to which the policy is applied

Class map associated with the policy

Status of any load balancing operations

The VFW application updates the counters that the show service-policy command displays after the applicable connections are closed.

Examples

The following example shows how to display the statistics and current status of the service policy APP_INSPECT_L4POLICY:

firewall/Admin# show service-policy APP_INSPECT_L4POLICY

Status     : ACTIVE
-----------------------------------------
Context Global Policy:
  service-policy: APP_INSPECT_L4POLICY
    class: APP_INSPECT_L4CLASS
      inspect dns:
        max length: 0
        curr conns       : 0         , hit count        : 0
        dropped conns    : 0
        client pkt count : 0         , client byte count: 0
        server pkt count : 0         , server byte count: 0

Table 8 describes the fields in the show service-policy detail command output for an application protocol inspection policy map.

Table 8 Field Descriptions for the show service-policy detail Command Output 

Field
Description

Status

Status of the policy map as applied in a service policy to an interface: Active or Inactive

Description

Optional description about the policy map

Context Global Policy

Indicates that the service policy has been applied globally in configuration mode to all interfaces for the context

Interface

Identifier of the interface associated with the service policy

Service-Policy

Identifier of the policy map

Class

Identifier of the class map associated with the policy map

Inspect DNS

Displays DNS application protocol inspection statistics

Inspect HTTP

Displays HTTP application protocol inspection statistics

Inspect FTP

Displays FTP application protocol inspection statistics

Inspect ICMP

Displays ICMP application protocol inspection statistics

Inspect RTSP

Displays RTSP application protocol inspection statistics

Max Length

Maximum length of a DNS reply

Strict FTP

Status of the strict FTP function for FTP application protocol inspection: Enabled or Disabled

URL Logging

Status of the URL logging function for HTTP application protocol inspection: Enabled or Disabled

ICMP Error

Status of the ICMP error function for ICMP application protocol inspection: Enabled or Disabled

Curr Conns

Number of active connections

Hit Count

Number of connections that the VFW application

Dropped Conns

Number of connections that the VFW application discarded

Client Pkt Count

Number of packets received from clients

Client Byte Count

Number of bytes received from clients

Server Pkt Count

Number of packets received from servers

Server Byte Count

Number of bytes received from servers

L4 Policy Stats

TotalReq/
Resp

Total number of requests and responses for the policy map

Total Allowed

Total number of packets received and allowed

Total Dropped

Total number of packets received and discarded

Total Logged

Total number of errors logged

L7 Policy

Identifier of the policy map associated with the service policy

L7 Policy Stats

Current status of the Layer 7 policy map, including the total number of Layer 7 rules

L7 Class/
Match

Identifier of the Layer 7 HTTP deep packet inspection class map and the associated policy map match actions

Total Inspected

Total number of packets inspected

Total Matched

Total number of packets matched

Total Reply Masked

Total number of masked system replies to the FTP SYST command. Applicable to only the FTP SYST command and its associated reply.

Total Dropped On Error

Total number of packets dropped due to an error in the match

TotalLogged

Total number of errors logged


Related Commands

Command
Description

clear service-policy

Clears the service policy statistics.

show running-config

Displays the running configuration information associated with the current context.

service-policy

Applies a previously created policy map and attaches the traffic policy to a specific interface or globally to all interfaces in the same context.