7-39
Cisco Intrusion Prevention System Sensor CLI Configuration Guide for IPS 7.2
OL-29168-01
Chapter7 Defining Signatures
Configuring Signatures
Configuring IP Logging
You can configure a sensor to generate an IP session log when the sensor detects an attack. When IP
logging is configured as a response action for a signature and the signature is triggered, all packets to
and from the source address of the alert are logged for a specified period of time.
Note
IP logging allows a maximum limit of 20 concurrent IP log files. Once the limit of 20 is reach ed, you
receive the following message in main.log:
Cid/W errWarnIpLogProcessor::addIpLog: Ran out of
file descriptors
.
Use the ip-log command in the signature definition submode to configure IP logging.
The following options apply:
ip-log-bytes—Identifies the maximum number of bytes you want logged. The valid value is 0 to
2147483647. The default is 0.
ip-log-packets—Identifies the number of packets you want logged. The valid value is 0 to 65535.
The default is 0.
ip-log-time—Identifies the duration you want the sensor to log. The valid value is 30 to 300
seconds. The default is 30 seconds.
Note
When the sensor meets any one of the I P logging conditions, it stops IP logging.
Configuring IP Logging Parameters
To configure the IP logging parameters, follow these steps:
Step 1
Log in to the CLI using an account with administrator or operator privileges.
Step 2
Enter IP log submode.
sensor# configure terminal
sensor(config)# service signature-definition sig1
sensor(config-sig)# ip-log
Step 3
Specify the IP logging parameters:
a.
Specify the maximum number of bytes you want logged.
sensor(config-sig-ip)# ip-log-bytes 200000
b.
Specify the number of packets you want logged.
sensor(config-sig-ip)# ip-log-packets 150
c.
Specify the length of time you want the sensor to log.
sensor(config-sig-ip)# ip-log-time 60
Step 4
Verify the settings.
sensor(config-sig-ip)# show settings
ip-log
-----------------------------------------------
ip-log-packets: 150 default: 0
ip-log-time: 60 default: 30
ip-log-bytes: 200000 default: 0
-----------------------------------------------