Cisco Systems and the ASA Services Module Network Router User Manual


 
10-21
Cisco ASA Series Firewall CLI Configuration Guide
Chapter 10 Configuring Inspection of Basic Internet Protocols
Instant Messaging Inspection
Configuring an Instant Messaging Inspection Policy Map for Additional
Inspection Control
To specify actions when a message violates a parameter, create an IM inspection policy map. You can
then apply the inspection policy map when you enable IM inspection.
To create an IM inspection policy map, perform the following steps:
Step 1 (Optional) Add one or more regular expressions for use in traffic matching commands according to the
general operations configuration guide. See the types of text you can match in the match commands
described in Step 3.
Step 2 (Optional) Create one or more regular expression class maps to group regular expressions according to
the general operations configuration guide.
Step 3 (Optional) Create an IM inspection class map by performing the following steps.
A class map groups multiple traffic matches. Traffic must match all of the match commands to match
the class map. You can alternatively identify match commands directly in the policy map. The difference
between creating a class map and defining the traffic match directly in the inspection policy map is that
the class map lets you create more complex match criteria, and you can reuse class maps.
To specify traffic that should not match the class map, use the match not command. For example, if the
match not command specifies the string “example.com,” then any traffic that includes “example.com”
does not match the class map.
For the traffic that you identify in this class map, you can specify actions such as drop-connection, reset,
and/or log the connection in the inspection policy map.
If you want to perform different actions for each match command, you should identify the traffic directly
in the policy map.
a. Create the class map by entering the following command:
ciscoasa(config)# class-map type inspect im [match-all | match-any] class_map_name
ciscoasa(config-cmap)#
Where the class_map_name is the name of the class map. The match-all keyword is the default, and
specifies that traffic must match all criteria to match the class map. The match-any keyword
specifies that the traffic matches the class map if it matches at least one of the criteria. The CLI
enters class-map configuration mode, where you can enter one or more match commands.
b. (Optional) To add a description to the class map, enter the following command:
ciscoasa(config-cmap)# description string
Where the string is the description of the class map (up to 200 characters).
c. (Optional) To match traffic of a specific IM protocol, such as Yahoo or MSN, enter the following
command:
ciscoasa(config-cmap)# match [not] protocol {im-yahoo | im-msn}
d. (Optional) To match a specific IM service, such as chat, file-transfer, webcam, voice-chat,
conference, or games, enter the following command:
ciscoasa(config-cmap)# match [not] service {chat | file-transfer | webcam | voice-chat
| conference | games}
e. (Optional) To match the source login name of the IM message, enter the following command:
ciscoasa(config-cmap)# match [not] login-name regex {class class_name | regex_name}