16-16
Cisco Intrusion Prevention System CLI Sensor Configuration Guide for IPS 7.1
OL-19892-01
Chapter 16 Working With Configuration Files
Filtering the Current Configuration Output
sensor(config)# exit
sensor#
Step 17 Display the current configuration for the web server submode.
sensor# configure terminal
sensor(config)# service web-server
sensor(config-web)# show settings
enable-tls: true <defaulted>
port: 443 <defaulted>
server-id: HTTP/1.1 compliant <defaulted>
sensor(config-web)# exit
sensor(config)# exit
sensor#
Filtering the Current Configuration Output
Use the more keyword | [begin | exclude | include] regular-expression command to search the output of
the more command. The following options apply:
• keyword—Specifies either the current-config or the backup-config:
–
current-config—Specifies the current running configuration. This configuration becomes
persistent as the commands are entered.
–
backup-config—Specifies the storage location for the configuration backup file.
• |—The pipe symbol indicates that an output processing specification follows.
• begin—Begins unfiltered output of the more command with the first line that contains the regular
expression specified.
• exclude—Excludes lines in the output of the more command that contain a particular regular
expression.
• include—Includes only the lines in the output of the more command that contain the regular
expression you specify.
• regular-expression—Specifies any regular expression found in the more command output.
Note The regular-expression option is case sensitive and allows for complex matching
requirements.
Filtering Using the More Command
To filter the more command, follow these steps:
Step 1 Log in to the CLI using an account with administrator privileges.
Step 2 Filter the current-config output beginning with the regular expression “ip,” for example.
sensor# more current-config | begin ip
generating current config:
host-ip 192.0.2.0/24,192.0.2.17
host-name sensor
telnet-option enabled
access-list 10.0.0.0/8
access-list 64.0.0.0/8