25-28
Cisco Security Appliance Command Line Configuration Guide
OL-12172-03
Chapter 25 Configuring Application Layer Protocol Inspection
FTP Inspection
Step 1
(Optional) Add one or more regular expressions for use in traffic matching commands according to the
“Creating a Regular Expression” section on page 21-6
. 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
“Creating a Regular Expression Class Map” section on page 21-9
.
Step 3
(Optional) Create an FTP 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, drop-connection,
reset, mask, set the rate limit, 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:
hostname(config)#
class-map type
inspect
ftp
[
match-all
|
match-any
]
class_map_name
hostname(config-cmap)#
Where
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:
hostname(config-cmap)#
description
string
c.
(Optional) To match a filename for FTP transfer, enter the following command:
hostname(config-cmap)#
match
[
not
]
filename regex
[
regex_name
|
class
regex_class_name
]
Where the
regex_name
is the regular expression you created in
Step 1
. The
class
regex_class_name
is the regular expression class map you created in
Step 2
.
d.
(Optional) To match a file type for FTP transfer, enter the following command:
hostname(config-cmap)#
match
[
not
]
filetype regex
[
regex_name
|
class
regex_class_name
]
Where the
regex_name
is the regular expression you created in
Step 1
. The
class
regex_class_name
is the regular expression class map you created in
Step 2
.
e.
(Optional) To disallow specific FTP commands, use the following command:
hostname(config-cmap)#
match
[
not
]
request-command
ftp_command
[
ftp_command
...]
Where
ftp_command
with one or more FTP commands that you want to restrict. See
Table 25-3
for
a list of the FTP commands that you can restrict.
Summary of Contents for 500 Series
Page 38: ...Contents xxxviii Cisco Security Appliance Command Line Configuration Guide OL 12172 03 ...
Page 45: ...P A R T 1 Getting Started and General Information ...
Page 46: ......
Page 277: ...P A R T 2 Configuring the Firewall ...
Page 278: ......
Page 561: ...P A R T 3 Configuring VPN ...
Page 562: ......
Page 891: ...P A R T 4 System Administration ...
Page 892: ......
Page 975: ...P A R T 5 Reference ...
Page 976: ......