5.5.1.1 Lab - Configuring An Intrusion Prevention System (IPS) Using The CLI and CCP - Instructor
5.5.1.1 Lab - Configuring An Intrusion Prevention System (IPS) Using The CLI and CCP - Instructor
Topology
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
IP Addressing Table
Objectives
Part 1: Configure Basic Router Settings
Configure hostname, interface IP addresses, and access passwords.
Configure the static routing.
Part 2: Use CLI to Configure an IOS IPS
Configure IOS Intrusion Prevention System (IPS) using CLI.
Modify IPS Signatures.
Examine the resulting IPS configuration.
Verify IPS functionality.
Log IPS messages to a syslog server.
Part 3: Configure an IPS Using CCP
Configure IPS using CCP.
Modify IPS signatures.
Examine the resulting IPS configuration.
Use a scanning tool to simulate an attack.
Use the CCP Monitor to verify IPS functionality.
Background / Scenario
In this lab, you will configure the Cisco IOS Intrusion Prevention System (IPS), which is part of the Cisco IOS
Firewall feature set. IPS examines certain attack patterns and alerts or mitigates when those patterns occur.
IPS alone is not enough to make a router into a secure Internet firewall, but in addition to other security
features, it can be a powerful defense.
You will configure IPS using the Cisco IOS CLI on one router and CCP on another router, and then test IPS
functionality on both routers. You will load the IPS Signature package from a TFTP server and configure the
public crypto key using the Cisco IOS CLI and CCP.
Note: The router commands and output in this lab are from a Cisco 1841 router with Cisco IOS Release
15.1(4)M8 (Advanced IP Services image). Other routers and Cisco IOS versions can be used. See the Router
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Interface Summary Table at the end of the lab to determine which interface identifiers to use based on the
equipment in the lab. Depending on the router model and Cisco IOS version, the commands available and
output produced might vary from what is shown in this lab.
Note: Ensure that the routers and switches have been erased and have no startup configurations.
Instructor Note: Instructions for initializing the network devices are provided in Lab 0.0.0.0.
Required Resources
3 Routers (Cisco 1841 with Cisco IOS Release 15.1(4)M8 Advanced IP Services image or comparable)
2 Switches (Cisco 2960 or comparable)
2 PCs (Windows Vista or Windows 7 with CCP 2.5, Tftpd32 server, Nmap/Zenmap, latest version of Java,
Internet Explorer, and Flash Player)
Serial and Ethernet cables as shown in the topology
Console cables to configure Cisco networking devices
IPS Signature package and public crypto key files on PC-A and PC-C (provided by instructor)
CCP Notes:
Refer to Lab 0.0.0.0 for instructions on how to install and run CCP.
If the PC on which CCP is installed is running Windows Vista or Windows 7, it may be necessary to right-
click the CCP icon, and select Run as administrator.
To run CCP, it may be necessary to temporarily disable antivirus programs and O/S firewalls. Ensure that
all pop-up blockers are turned off in the browser.
Instructor Notes:
Router Resource Requirements:
Note: The following requirements are critical to successful completion of this lab.
The routers that run IPS (R1 and R3) require a minimum of 192MB DRAM and at least 2 MB free flash
memory. They must also be running T-Train Cisco IOS Release 12.4(11)T1 or later (preferably 12.4(20)T
or later) to support the version 5.x format signature package.
These requirements are critical to successful completion of this lab.
This lab uses the newest Version 5.x signature files, which are independent of the Cisco IOS software.
Prior to Cisco IOS release 12.4(11)T, Cisco IOS IPS had 132 built-in signatures available in the Cisco
IOS software image. The built-in signatures are hard-coded into the Cisco IOS software image for
backward compatibility. Starting with Cisco IOS release 12.4(11)T, there are no built-in (hard-coded)
signatures within Cisco IOS software. Support for signatures and signature definition files (SDFs) in Cisco
IPS version 4.x are discontinued in 12.4(11)T1 and further Cisco IOS T-Train software releases.
Some previous IPS security labs used pre-12.4(11) IOS and assume the availability of a built-in IOS
signature file. They also use the ip ips sdf location command, which is not supported in later IOS
releases.
To configure IOS IPS for 12.4(11)T and later, a signature package in Cisco IPS version 5.x format is
required to load signatures to IOS IPS. Cisco provides a version 5.x format signature package for CLI
users.
The IOS-Sxxx-CLI.pkg link can be used to download the latest IPS v5.x signature package. You will need
a valid CCO (Cisco.com) login username and password and a current Cisco Service Contract.
Note: It is recommended to use the latest signature file available in a production environment. However, if
the amount of router flash memory is an issue in the lab environment, consider downloading an older
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
version 5.x signature file, which requires less memory. The S364 file is used with this lab, although newer
versions are available. Consult CCO to determine the latest version for use in a production environment.
The realm-cisco.pub.key.txt file contains the public crypto key used by IOS IPS v5.x. The key is included
in the lab.
PC-C Java Requirements
The latest JRE for Windows Vista or Windows 7 can be downloaded from Oracle Corporation at
http://www.oracle.com/.
Refer to Part 3 for instructions on how to set the runtime parameter and Java settings.
Lab Delivery
This lab is divided into three parts. Each part may be administered individually or in combination with
others as time permits. The main goal is to configure IOS IPS on one router (R1) by using the CLI and
configure it on another router (R3) by using CCP.
R1 and R3 are on separate networks and communicate through R2, which simulates an ISP. The routers
in this lab are configured with static routes.
Students can work in teams of two for router configuration, one person configuring R1 and the other R3.
Although switches are shown in the topology, students can omit the switches and use crossover cables
between the PCs and routers R1 and R3.
The basic running configs for all three routers are captured after Part 1 of the lab is completed. The
running config for R1 in Part 2 and the running config for R3 in Part 3 are captured and listed separately.
All configs are found at the end of the lab.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Directory of flash:/ipsdir/
No files in directory
Note: The directory exists, but there are currently no files in it.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 1: Copy and paste the crypto key file into R1.
Select and copy the following crypto key file named realm-cisco.pub.key.txt.
crypto key pubkey-chain rsa
named-key realm-cisco.pub signature
key-string
30820122 300D0609 2A864886 F70D0101 01050003 82010F00 3082010A 02820101
00C19E93 A8AF124A D6CC7A24 5097A975 206BE3A2 06FBA13F 6F12CB5B 4E441F16
17E630D5 C02AC252 912BE27F 37FDD9C8 11FC7AF7 DCDD81D9 43CDABC3 6007D128
B199ABCB D34ED0F9 085FADC1 359C189E F30AF10A C0EFB624 7E0764BF 3E53053E
5B2146A9 D7A5EDE3 0298AF03 DED7A5B8 9479039D 20F30663 9AC64B93 C0112A35
FE3F0C87 89BCB7BB 994AE74C FA9E481D F65875D6 85EAF974 6D9CC8E3 F0B08B85
50437722 FFBE85B9 5E4189FF CC189CB9 69C46F9C A84DFBA5 7A0AF99E AD768C36
006CF498 079F88F8 A3B3FB1F 9FB7B3CB 5539E1D1 9693CCBB 551F78D2 892356AE
2F56D826 8918EF3C 80CA4F4D 87BFCA3B BFF668E9 689782A5 CF31CB6E B4B094D3
F3020301 0001
quit
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 2: Configure the IPS Signature storage location in router flash memory.
The IPS files will be stored in the ipsdir directory that was created in Task 2, Step 2. Configure the location
using the ip ips config location command.
R1(config)# ip ips config location flash:ipsdir
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 6: Configure IOS IPS to use one of the pre-defined signature categories.
IOS IPS with Cisco 5.x format signatures operates with signature categories, just like Cisco IPS appliances
do. All signatures are pre-grouped into categories, and the categories are hierarchical. This helps classify
signatures for easy grouping and tuning.
Warning: The “all” signature category contains all signatures in a signature release. Because IOS IPS cannot
compile and use all the signatures contained in a signature release at one time, do not unretire the “all”
category. Otherwise, the router will run out of memory.
Note: When configuring IOS IPS, it is required to first retire all the signatures in the “all” category and then
unretire selected signature categories.
Instructor Note: The order in which the signature categories are configured on the router is also important.
IOS IPS processes the category commands in the order listed in the configuration. Some signatures belong to
multiple categories. If multiple categories are configured and a signature belongs to more than one of them,
IOS IPS uses the signature properties (for example, retired/unretired, actions, etc.) in the last configured
category.
In the following example, all signatures in the all category are retired, and then the ios_ips basic category is
unretired.
R1(config)# ip ips signature-category
R1(config-ips-category)# category all
R1(config-ips-category-action)# retired true
R1(config-ips-category-action)# exit
R1(config-ips-category)# category ios_ips basic
R1(config-ips-category-action)# retired false
R1(config-ips-category-action)# exit
R1(config-ips-category)# exit
Do you want to accept these changes? [confirm] <Enter>
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
b. Although the R1 Fa0/1 interface is an internal interface, configure it with IPS to respond to internal
attacks. Apply the IPS rule to the R1 Fa0/1 interface in the inbound direction.
R1(config)# interface fa0/1
R1(config-if)# ip ips iosips in
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 2: Start the TFTP server on PC-A and verify the IPS file directory.
a. Verify connectivity between R1 and PC-A, the TFTP server, using the ping command.
b. Verify that the PC has the IPS Signature package file in a directory on the TFTP server. This file is
typically named IOS-Sxxx-CLI.pkg, where xxx is the signature file version.
Note: If this file is not present, contact your instructor before continuing.
c. Start Tftpd32 or another TFTP server and set the default directory to the one with the IPS Signature
package in it. The Tftpd32 screen is shown here with the C:\Program Files\Tftpd32\IPS directory contents
displayed. Take note of the filename for use in the next step.
Note: It is recommended to use the latest signature file available in a production environment. However, if
the amount of router flash memory is an issue in a lab environment, you may use an older version 5.x
signature, which requires less memory. The S364 file is used with this lab for demonstration purposes,
although newer versions are available. Consult CCO to determine the latest version.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 3: Copy the signature package from the TFTP server to the router.
If you do not have a TFTP server available, and you are using a router with a USB port, go to Step 5 and use
the procedure described there.
a. Use the copy tftp command to retrieve the signature file and load it into the Intrusion Detection
Configuration. Use the idconf keyword at the end of the copy command.
Note: Immediately after the signature package is loaded to the router, signature compiling begins. You
can see the messages on the router with logging level 6 or above enabled.
R1# copy tftp://192.168.1.3/IOS-S364-CLI.pkg idconf
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 13 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
<Output Omitted>
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 14 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 5: (Optional) Alternative methods of copying the signature package to the router.
If you used TFTP to copy the file and will not use one of these alternative methods, read through the
procedures described here to become familiar with them. If you use one of these methods instead of TFTP,
return to Step 4 to verify that the signature package loaded properly.
FTP method: Although the TFTP method is generally adequate, the signature file is rather large and FTP can
provide another method of copying the file. You can use an FTP server to copy the signature file to the router
with this command:
copy ftp://<ftp_user:password@Server_IP_address>/<signature_package> idconf
In the following example, the user admin must be defined on the FTP server with a password of cisco.
R1# copy ftp://admin:[email protected]/IOS-S364-CLI.pkg idconf
Loading IOS-S364-CLI.pkg !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 7608873/4096 bytes]
USB method: If there is no access to a FTP or TFTP server, you can use a USB flash drive to load the
signature package to the router.
a. Copy the signature package onto the USB drive.
b. Connect the USB drive to one of the USB ports on the router.
c. Use the show file systems command to see the name of the USB drive. In the following output, a 4 GB
USB drive is connected to the USB port on the router as file system usbflash0:
R1# show file systems
File Systems:
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 15 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
- - network rw tftp:
196600 185972 nvram rw nvram:
* 64012288 14811136 disk rw flash:#
- - opaque wo syslog:
- - opaque rw xmodem:
- - opaque rw ymodem:
- - network rw rcp:
- - network rw pram:
- - network rw http:
- - network rw ftp:
- - network rw scp:
- - opaque ro tar:
- - network rw https:
- - opaque ro cns:
4001378304 3807461376 usbflash rw usbflash0:
d. Verify the contents of the flash drive using the dir command.
R1# dir usbflash0:
Directory of usbflash0:/
90 -rw- 6654646 Jan 5 2009 14:49:34 +00:00 IOS-S364-CLI.pkg
91 -rw- 805 Jan 5 2009 14:49:34 +00:00 realm-cisco.pub.key.txt
e. Use the copy command with the idconf keyword to copy the signature package to the router.
R1# copy usbflash0:IOS-S364-CLI.pkg idconf
The USB copy process can take 60 seconds or more, and no progress indicator displays. When the copy
process is complete, numerous engine building messages display. These must finish before the
command prompt returns.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 16 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 17 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Note: The ICMP echo request IPS risk rating (severity level) is relatively low at 25. Risk rating can range from
0 to 100.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 18 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
c. Install Nmap/Zenmap.
c. After the scan is complete, review the results displayed in the Nmap Output tab.
d. Click the Ports/Hosts tab. How many open ports did Nmap find on R2? What are the associated port
numbers and services?
____________________________________________________________________________________
____________________________________________________________________________________
Zenmap found 1 open port. TCP port 23 (Telnet) is open on R2.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 19 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
e. Exit Zenmap.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 20 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
d. Click Apply.
e. Click Yes to allow the changes, and then click OK to acknowledge the changes.
Step 4: Restart all web browsers, including CCP if opened, for the changes to take effect.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 21 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
b. Verify the R3 basic configuration as performed in Part 1 of this lab. Are there any security commands
related to IPS?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
There should not be. There is a minimum password length of 10. Login passwords and exec-timeout are
defined on the console, vty, and aux lines.
Step 1: Configure the enable secret password and secure HTTP router access prior to starting
CCP.
a. From the CLI, configure the enable secret password for use with CCP on R3.
R3(config)# enable secret cisco12345
b. Enable the secure HTTP server on R3.
R3(config)# ip http secure-server
c. Add admin user to the local database.
R3(config)# username admin privilege 15 secret cisco12345
d. Configure CCP to use the local database to authenticate web sessions.
R3(config)# ip http authentication local
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 22 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Directory of flash:/ipsdir/
No files in directory
Note: The directory exists, but there are currently no files in it.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 23 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Step 2: Use the CCP IPS Wizard to configure Cisco IOS IPS.
a. On the CCP menu bar, click Configure, and then select Security > Intrusion Prevention > Create IPS.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 24 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
b. Click Launch IPS Rule Wizard to open the Welcome to the IPS Policies Wizard window.
c. Read the information on the IPS Policies Wizard screen to become familiar with what the wizard does,
and click Next.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 25 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Note: SDEE dialog boxes might appear. Read the information and click OK for each dialog box.
d. In the Select Interfaces window, click the Inbound check box for Fast Ethernet0/1 and Serial0/0/1, and
click Next.
Note: Selecting inbound on both interfaces allows IPS to monitor attacks on the router from the internal
and external network.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 26 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
e. In the Signature File and Public Key window, click the ellipsis (…) button next to Specify the Signature
File You Want to Use with IOS IPS to open the Specify Signature File window. Confirm that the Specify
signature file using URL option is selected.
f. For Protocol, from the drop-down list, select tftp. Enter the IP address of the PC-C TFTP server and the
filename. For example, 192.168.3.3/IOS-S364-CLI.pkg.
g. What other options can be specified as a source for the Signature File?
____________________________________________________________________________________
____________________________________________________________________________________
From router flash or from a folder on the PC running CCP.
h. Click OK to return to the Signature File and Public Key window. In the Configure Public Key section in the
Signature File and Public Key window, enter realm-cisco.pub in the Name field.
Each change to the signature configuration is saved in a delta file. This file must be digitally signed with a
public key. You can obtain a key from Cisco.com and paste the information in the Name and Key fields. In
this lab, you will copy and paste the key from a text file on PC-C.
i. Open the realm-cisco-pub-key.txt file located on the PC-C desktop. The following is an example from the
realm-cisco-pub-key.txt file.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 27 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
j. Copy the text between the phrase key-string and the word quit from the realm-cisco_pub_key.txt file into
the Key field in the Configure Public Key section. The Signature File and Public Key window should look
similar to the following when the entries are complete.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 28 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
k. Click Next to display the Config Location and Category window, whichspecifies where to store the
signature information. This file is used by the Cisco IOS IPS for detecting attacks from coming into the
Fast Ethernet0/1 or Serial0/0/1 interfaces.
l. In the Config Location and Category window > Config Location section, click the ellipsis (...) button
next to Config Location to add the location.
m. Verify that the Specify the config location on this router option is selected. Click the ellipsis (...) button.
Click the plus sign (+) next to flash. Select the ipsdir folder, and then click OK.
n. Because router memory and resource constraints might prevent using all the available signatures, there
are two categories of signatures: basic and advanced. In the Config Location and Category window >
Choose Category field, select basic. The Config Location and Category window should look similar to
the following screen excerpt when the entries are complete.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 29 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
o. In the Cisco CCP IPS Policies Wizard window, click Next. The Summary window displays. Examine the
IPS configuration information shown.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 30 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
p. In the IPS Policies Wizard window, click Finish, and review the commands that will be delivered to the
router.
q. Click Deliver. How many commands were delivered to the router?
____________________________________________________________________________________
19 in this case with CCP 2.5.
r. When the Commands Deliver Status window is ready, click OK. The IOS IPS Configuration Status
window opens stating that it can take several minutes for the signatures to be configured.
Instructor Note (optional): If you want to see what the router is actually doing while the CCP progress
bar is shown, open a session to the router and watch the terminal messages. Remember, if your session
is not established through a console port you won't see the debug messages by default. The terminal
monitor command must be issued first. A sample of this output is listed at the end of this document.
s. When the signature configuration process is complete, you are returned to the IPS window with the Edit
IPS tab selected. Your screen should look similar to the following:
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 31 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
t. Select interface Serial0/0/1 from the list. What information is displayed at the bottom of the screen?
____________________________________________________________________________________
____________________________________________________________________________________
A message says: IPS rule is enabled, but there is no filter configured for this rule. IPS will scan all
inbound traffic.
Step 2: Configure the IPS application to drop ping (echo request) traffic.
a. On the CCP menu bar, click Configure and select Security > Intrusion Prevention > Edit IPS >
Signatures. How many total signatures are there?
____________________________________________________________________________________
2306 for signature definition file.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 32 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 33 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
Return to PC-C and ping R3 again. Were the pings successful this time?
____________________________________________________________________________________
____________________________________________________________________________________
No. The ICMP echo request signature (2004) was unretired and enabled and set to block all packets in
line.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 34 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
d. On the CCP menu bar, click Configure and select Router > Logging. In the Additional Tasks window,
click Edit to ensure that syslog is running on R3. The window should be similar to the following:
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 35 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
e. Click OK.
f. On the CCP menu bar, click Monitor and select Router > Logging.
g. A number of syslog messages display. Click Clear to clear the log.
h. From the R2 CLI, ping the R3 Fa0/1 interface at 192.168.3.1 again.
i. Click Update. You will see that the Cisco IOS IPS logged the ping attempts from R2.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 36 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
b. Click Update. You will see that the Cisco IOS IPS has been logging the port scans generated by
Zenmap.
c. You should see syslog messages on R3 and entries in the CCP Monitor Log with descriptions that include
one of these phrases: TCP SYN/FIN Packet or TCP NULL Packet.
Task 10: Compare the Results for Different IPS Configuration Methods
a. On R1, display the running configuration after IPS was configured with IOS CLI commands. Note the
commands related to IPS.
ip ips config location flash:ipsdir/ retries 1
ip ips notify SDEE
ip ips name iosips
!
ip ips signature-category
category all
retired true
category ios_ips basic
retired false
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 37 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 38 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
F3020301 0001
Quit
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
ip ips sdm_ips_rule in
interface Serial0/0/1
ip address 10.2.2.1 255.255.255.252
ip ips sdm_ips_rule in
What differences are there between the CLI-based running configuration and the CCP-based running
configuration?
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
They are almost the same. The name of the IPS rule on R1 is iosips, whereas on R3 the IPS rule name is
sdm_ips_rule. R1 was configured to log syslog messages to PC-A so that they could be viewed on the
syslog server. R3 CCP Monitor Logging serves the same function, so a reference to an external syslog
server is not required.
Reflection
1. What are some advantages and disadvantages to using CLI or CCP to configure IPS?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Answers will vary but could include the following:
Both the CLI and CCP methods produce essentially the same results, but configuring IPS with the CLI is time
consuming and prone to keystroke errors. It also requires the administrator to have significant knowledge of
IOS IPS security command syntax, especially when making changes to signature characteristics.
CCP provides the maximum flexibility and prompts the user through IPS creation, thus greatly simplifying the
process. It also provides a GUI that can be used to make signature modifications and to observe IPS with
respect to potential attack activity.
With the newer version 5.x signature files, either method requires some work in advance to make sure that
the necessary signature and crypto key files are available in a location that is accessible to the router.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 39 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
2. With version 5.x signature files, if changes are made to a signature, are they visible in the router running
configuration?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
No. The signature files are not part of Cisco IOS or router configuration. There is no information regarding the
details of the signatures or the signature file contents visible to the user, except via Cisco IOS CLI
manipulation and IPS show commands.
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
1800 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(Fa0/0) (Fa0/1)
1900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
2801 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/1/0 (S0/1/0) Serial 0/1/1 (S0/1/1)
(Fa0/0) (Fa0/1)
2811 Fast Ethernet 0/0 Fast Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(Fa0/0) (Fa0/1)
2900 Gigabit Ethernet 0/0 Gigabit Ethernet 0/1 Serial 0/0/0 (S0/0/0) Serial 0/0/1 (S0/0/1)
(G0/0) (G0/1)
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An
example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be
used in Cisco IOS commands to represent the interface.
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 40 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 41 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 42 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 43 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
log config
hidekeys
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.1.1.1 255.255.255.252
no fair-queue
clock rate 64000
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
!
interface Vlan1
no ip address
!
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
password 7 14141B180F0B29242A38322631
logging synchronous
login
line aux 0
exec-timeout 5 0
password 7 045802150C2E4D5B1109040401
login
line vty 0 4
exec-timeout 5 0
password 7 05080F1C2243581D0015160118
login
!
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 44 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 45 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 46 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
boot-start-marker
boot-end-marker
!
security passwords min-length 10
logging message-counter syslog
!
no aaa new-model
dot11 syslog
ip source-route
!
ip cef
no ip domain lookup
!
no ipv6 cef
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
no fair-queue
clock rate 2000000
!
interface Serial0/0/1
ip address 10.2.2.1 255.255.255.252
!
interface Vlan1
no ip address
!
ip route 0.0.0.0 0.0.0.0 10.2.2.2
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 47 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
control-plane
!
line con 0
exec-timeout 0 0
password 7 01100F17580405002F5C4F1A0A
logging synchronous
login
line aux 0
exec-timeout 5 0
password 7 094F471A1A0A1607131C053938
login
line vty 0 4
exec-timeout 5 0
password 7 14141B180F0B3C3F3D38322631
login
!
scheduler allocate 20000 1000
end
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 48 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
category all
retired true
category ios_ips basic
retired false
!
no ipv6 cef
multilink bundle-name authenticated
!
archive
log config
hidekeys
!
crypto key pubkey-chain rsa
named-key realm-cisco.pub signature
key-string
30820122 300D0609 2A864886 F70D0101 01050003 82010F00 3082010A 02820101
00C19E93 A8AF124A D6CC7A24 5097A975 206BE3A2 06FBA13F 6F12CB5B 4E441F16
17E630D5 C02AC252 912BE27F 37FDD9C8 11FC7AF7 DCDD81D9 43CDABC3 6007D128
B199ABCB D34ED0F9 085FADC1 359C189E F30AF10A C0EFB624 7E0764BF 3E53053E
5B2146A9 D7A5EDE3 0298AF03 DED7A5B8 9479039D 20F30663 9AC64B93 C0112A35
FE3F0C87 89BCB7BB 994AE74C FA9E481D F65875D6 85EAF974 6D9CC8E3 F0B08B85
50437722 FFBE85B9 5E4189FF CC189CB9 69C46F9C A84DFBA5 7A0AF99E AD768C36
006CF498 079F88F8 A3B3FB1F 9FB7B3CB 5539E1D1 9693CCBB 551F78D2 892356AE
2F56D826 8918EF3C 80CA4F4D 87BFCA3B BFF668E9 689782A5 CF31CB6E B4B094D3
F3020301 0001
quit
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
ip ips iosips in
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.1.1.1 255.255.255.252
ip ips iosips in
no fair-queue
clock rate 64000
!
interface Serial0/0/1
no ip address
shutdown
clock rate 2000000
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 49 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
!
interface Vlan1
no ip address
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.1.1.2
no ip http server
no ip http secure-server
!
logging 192.168.1.3
!
control-plane
!
line con 0
exec-timeout 0 0
password 7 0822455D0A1606181C1B0D1739
logging synchronous
login
line aux 0
exec-timeout 5 0
password 7 1511021F07252A313023343100
login
line vty 0 4
exec-timeout 5 0
password 7 060506324F411F0D1C0713181F
login
!
scheduler allocate 20000 1000
end
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 50 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 51 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
quit
!
username admin privilege 15 secret 5 $1$AEtl$bWGSiN.92PF17C9Y8orpu1
archive
log config
hidekeys
!
crypto key pubkey-chain rsa
named-key realm-cisco.pub
key-string
30820122 300D0609 2A864886 F70D0101 01050003 82010F00 3082010A 02820101
00C19E93 A8AF124A D6CC7A24 5097A975 206BE3A2 06FBA13F 6F12CB5B 4E441F16
17E630D5 C02AC252 912BE27F 37FDD9C8 11FC7AF7 DCDD81D9 43CDABC3 6007D128
B199ABCB D34ED0F9 085FADC1 359C189E F30AF10A C0EFB624 7E0764BF 3E53053E
5B2146A9 D7A5EDE3 0298AF03 DED7A5B8 9479039D 20F30663 9AC64B93 C0112A35
FE3F0C87 89BCB7BB 994AE74C FA9E481D F65875D6 85EAF974 6D9CC8E3 F0B08B85
50437722 FFBE85B9 5E4189FF CC189CB9 69C46F9C A84DFBA5 7A0AF99E AD768C36
006CF498 079F88F8 A3B3FB1F 9FB7B3CB 5539E1D1 9693CCBB 551F78D2 892356AE
2F56D826 8918EF3C 80CA4F4D 87BFCA3B BFF668E9 689782A5 CF31CB6E B4B094D3
F3020301 0001
quit
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
ip ips sdm_ips_rule in
ip virtual-reassembly
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
no fair-queue
clock rate 2000000
!
interface Serial0/0/1
ip address 10.2.2.1 255.255.255.252
ip ips sdm_ips_rule in
ip virtual-reassembly
!
interface Vlan1
no ip address
!
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 52 of 53
Lab – Configuring an Intrusion Prevention System (IPS) Using the CLI and CCP
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.2.2.2
no ip http server
ip http authentication local
ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
password 7 0822455D0A1606181C1B0D1739
logging synchronous
login
line aux 0
exec-timeout 5 0
password 7 060506324F41080C1D0713181F
login
line vty 0 4
exec-timeout 5 0
password 7 02050D4808091935555E080A16
login
!
scheduler allocate 20000 1000
end
© 2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 53 of 53