
- •Using Your Sybex Electronic Book
- •Acknowledgments
- •Introduction
- •Assessment Test
- •Answers to Assessment Test
- •Types of Network Security Threats
- •Types of Security Weaknesses
- •Technology Weaknesses
- •Configuration Weaknesses
- •Policy Weaknesses
- •Types of Network Attacks
- •Eavesdropping
- •Denial-of-Service Attacks
- •Unauthorized Access
- •WareZ
- •Masquerade Attack (IP Spoofing)
- •Session Hijacking or Replaying
- •Rerouting
- •Repudiation
- •Smurfing
- •Password Attacks
- •Man-in-the-Middle Attacks
- •Application-Layer Attacks
- •Trojan Horse Programs, Viruses, and Worms
- •HTML Attacks
- •The Corporate Security Policy
- •Summary
- •Exam Essentials
- •Key Terms
- •Written Lab
- •Review Questions
- •Answers to Written Lab
- •Answers to Review Questions
- •Authentication Methods
- •Windows Authentication
- •Security Server Authentication
- •PAP and CHAP Authentication
- •PPP Callback
- •Configuring the NAS for AAA
- •Securing Access to the Exec Mode
- •Enable AAA Locally on the NAS
- •Authentication Configuration on the NAS
- •Authorization Configuration on the NAS
- •Accounting Configuration on the NAS
- •Verifying the NAS Configuration
- •Troubleshooting AAA on the Cisco NAS
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Hands-On Labs
- •Lab 2.1: Setting the Line Passwords
- •Lab 2.2: Setting the Enable Passwords
- •Lab 2.3: Encrypting your Passwords
- •Lab 2.4: Creating Usernames and Logging In
- •Lab 2.5: Configuring AAA Authentication on the NAS
- •Answers to Written Lab
- •Answers to Review Questions
- •Introduction to the CiscoSecure ACS
- •Using User Databases for Authentication
- •Populating the User Database Population
- •New ACS Features
- •Installing CiscoSecure ACS 3.0
- •Administering CiscoSecure ACS
- •TACACS+ Overview
- •Configuring TACACS+
- •Using RADIUS
- •CiscoSecure User Database NAS Configuration for RADIUS
- •Verifying TACACS+
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Answers to Written Lab
- •Answers to Review Questions
- •Solving Eavesdropping and Session Replay Problems
- •Fighting Rerouting Attacks
- •Fighting Denial-of-Service Attacks
- •Turning Off and Configuring Network Services
- •Blocking SNMP Packets
- •Disabling Echo
- •Turning Off BOOTP and Auto-Config
- •Disabling the HTTP Interface
- •Disabling IP Source Routing
- •Disabling Proxy ARP
- •Disabling Redirect Messages
- •Disabling the Generation of ICMP Unreachable Messages
- •Disabling Multicast Route Caching
- •Disabling the Maintenance Operation Protocol (MOP)
- •Turning Off the X.25 PAD Service
- •Enabling the Nagle TCP Congestion Algorithm
- •Logging Every Event
- •Disabling Cisco Discovery Protocol
- •Disabling the Default Forwarded UDP Protocols
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Hands-On Lab
- •Lab 4.1: Controlling TCP/IP Services
- •Answers to Written Lab
- •Answers to Review Questions
- •Understanding the Cisco IOS Firewall
- •Authentication Proxy and IDS
- •Context-Based Access Control
- •CBAC Compared to ACLs
- •CBAC-Supported Protocols
- •Introduction to CBAC Configuration
- •Using Audit Trails and Alerts
- •Configuring Global Timeouts and Thresholds
- •Configuring PAM
- •Defining Inspection Rules
- •Applying Inspection Rules and ACLs to Router Interfaces
- •Configuring IP ACLs at the Interface
- •Testing and Verifying CBAC
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Hands-On Labs
- •Lab 5.1: Configure Logging and Audit Trails
- •Lab 5.2: Define and Apply Inspection Rules and ACLs
- •Lab 5.3: Test and Verify CBAC
- •Answers to Written Lab
- •Answers to Review Questions
- •Introduction to the Cisco IOS Firewall Authentication Proxy
- •Configuring the AAA Server
- •Configuring AAA
- •Configuring the Authentication Proxy
- •Testing and Verifying Your Configuration
- •show Commands
- •Clearing the Cache
- •Introduction to the Cisco IOS Firewall IDS
- •Initializing Cisco IOS Firewall IDS
- •Configuring, Disabling, and Excluding Signatures
- •Creating and Applying Audit Rules
- •Setting Default Actions
- •Creating an Audit Rule
- •Applying the Audit Rule
- •Verifying the Configuration
- •Stopping the IOS Firewall IDS
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Hands-On Labs
- •Lab 6.1: Enabling the IOS Firewall Authentication Proxy
- •Lab 6.2: Enabling the IOS Firewall IDS
- •Answers to Written Lab
- •Answers to Review Questions
- •What is a Virtual Private Network?
- •Introduction to Cisco IOS IPSec
- •IPSec Transforms
- •IPSec Operation
- •The Components of IPSec
- •IPSec Encapsulation
- •Internet Key Exchange (IKE)
- •Summary
- •Exam Essentials
- •Key Terms
- •Written Lab
- •Review Questions
- •Answers to Written Lab
- •Answers to Review Questions
- •Configuring Cisco IOS IPSec for Pre-Shared Keys Site-to-Site
- •Preparing for IKE and IPSec
- •Configuring IKE
- •Configuring IPSec
- •Testing and Verifying IPSec
- •Configuring IPSec Manually
- •Configuring IPSec for RSA-Encrypted Nonces
- •Configuring Cisco IOS IPSec Certificate Authority Support Site-to-Site
- •Configuring CA Support Tasks
- •Preparing for IKE and IPSec
- •Configuring CA Support
- •Configuring IKE Using CA
- •Configuring IPSec for CA
- •Testing and Verifying IPSec for CA
- •Summary
- •Exam Essentials
- •Key Terms
- •Commands Used in This Chapter
- •Written Lab
- •Review Questions
- •Hands-On Labs
- •Lab 8.1: Configure IKE on Lab_A and Lab_B
- •Lab 8.2: Configure IPSec on Lab_A and Lab_B
- •Answers to Written Lab
- •Answers to Review Questions
- •Answers to Hands-On Labs
- •Answer to Lab 8.1
- •Answer to Lab 8.2
- •Introduction to Cisco Easy VPN
- •The Easy VPN Server
- •Introduction to the Cisco VPN 3.5 Client
- •Easy VPN Server Configuration Tasks
- •Pre-Configuring the Cisco VPN 3.5 Client
- •Summary
- •Exam Essentials
- •Key Terms
- •Written Lab
- •Review Questions
- •Hands-On Lab
- •Lab 9.1: Installing the Cisco VPN 3.5 Client Software on Windows
- •Answers to Written Lab
- •Answers to Review Questions
- •Network Separation
- •Three Ways through a PIX Firewall
- •PIX Firewall Configuration Basics
- •Configuring Interfaces
- •Saving Your Configuration
- •Configuring Access through the PIX Firewall
- •Configuring Outbound Access
- •Configuring Inbound Access
- •Configuring Multiple Interfaces and AAA on the PIX Firewall
- •Configuring Multiple Interfaces
- •Implementing AAA on the PIX Firewall
- •Configuring Advanced PIX Firewall Features
- •Failover
- •Outbound Access Control
- •Logging
- •SNMP Support
- •Java Applet Blocking
- •URL Filtering
- •Password Recovery
- •Glossary

158 Chapter 5 Context-Based Access Control Configuration
Defining Inspection Rules
The inspection rules are what you use to define the applications and traffic types that you want to be inspected. Basically, this comes down to a named list that can have multiple lines, similar to an ACL. Most of the time you configure only a single inspection rule on a router, but if you’re applying CBAC in two directions, you’ve got to create two inspection rules. You’ll be creating a single inspection rule and applying it in a single direction for our corporate network example.
You should list all the applications that you want CBAC to monitor in the inspection rule. Generic TCP or UDP traffic is also allowed here. I’ve named the inspection rule IOSFW. Here it is on the Lab_B router:
Lab_B#conf t
Lab_B(config)#ip inspect name IOSFW ?
cuseeme |
CUSeeMe Protocol |
fragment |
IP fragment inspection |
ftp |
File Transfer Protocol |
h323 |
H.323 Protocol (e.g, MS NetMeeting, Intel Video Phone) |
http |
HTTP Protocol |
netshow |
Microsoft NetShow Protocol |
rcmd |
R commands (r-exec, r-login, r-sh) |
realaudio |
Real Audio Protocol |
rpc |
Remote Prodedure Call Protocol |
rtsp |
Real Time Streaming Protocol |
smtp |
Simple Mail Transfer Protocol |
sqlnet |
SQL Net Protocol |
streamworks |
StreamWorks Protocol |
tcp |
Transmission Control Protocol |
tftp |
TFTP Protocol |
udp |
User Datagram Protocol |
vdolive |
VDOLive Protocol |
Lab_B(config)#ip inspect name IOSFW ftp
Lab_B(config)#ip inspect name IOSFW h323
Lab_B(config)#ip inspect name IOSFW http
Lab_B(config)#ip inspect name IOSFW tcp
Lab_B(config)#ip inspect name IOSFW udp
Lab_B(config)#^Z
Lab_B#
You can see here that this inspection rule is configured to inspect three protocols—FTP, H323, and HTTP—plus all generic TCP and UCP traffic. If you want, you can include parameters for each protocol that control alerts, audit trails, and timeouts, as in the following example.
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

|
|
Introduction to CBAC Configuration |
159 |
Lab_B#conf t |
|
|
|
Lab_B(config)#ip inspect name IOSFW http ? |
|
||
alert |
|
Turn on/off alert |
|
audit-trail |
Turn on/off audit trail |
|
|
java-list |
Specify a standard access-list to apply the Java blocking. |
|
|
|
|
If specified, MUST appear directly after option "http" |
|
timeout |
Specify the inactivity timeout time |
|
|
<cr> |
|
|
|
Lab_B(config)#ip inspect name IOSFW http alert ? |
|
||
off |
Turn off alert |
|
|
on |
Turn on alert |
|
|
Lab_B(config)#ip inspect name IOSFW http alert on ? |
|
||
audit-trail |
Turn on/off audit trail |
|
|
timeout |
Specify the inactivity timeout time |
|
|
<cr> |
|
|
|
Lab_B(config)#ip inspect name IOSFW http alert on audit-trail ? |
|
||
off |
Turn off audit trail |
|
|
on |
Turn on audit trail |
|
Lab_B(config)#ip inspect name IOSFW http alert on audit-trail on
Lab_B(config)#^Z
Lab_B#
The ability to define inspection rules is important because there are several types of applications that have special inspection features. For example, when configuring Java applet filtering, you can use ACLs to specify trusted applet sources such as these:
Lab_B#conf t
Lab_B(config)#ip inspect name IOSFW http java-list 10 alert on
Lab_B(config)#access-list 10 permit 172.16.2.0 0.0.0.255
Lab_B(config)#access-list 10 permit deny any
Lab_B(config)#^Z
Lab_B#
If the applet comes from a trusted site, as specified by the ACL, CBAC allows it through. If not, the applet is stripped. There are also specific inspection rules for IP packet fragmentation, RPC, and SMTP that you can apply to prevent certain types of attacks.
You’re almost there! With the inspection rules defined, you’re ready for the second-to-last step: applying the inspection rules and ACLs to interfaces.
Applying Inspection Rules and ACLs to Router Interfaces
Let’s review what you set out to accomplish in the corporate network example and check your progress. You have a perimeter router (Lab_B) that you’ve been placing CBAC on, and you’ve configured alerts and audit trails, global timeouts, PAM, and an inspection rule. Check! But you
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

160 Chapter 5 Context-Based Access Control Configuration
still need to allow access from the external network to the web server and the DNS server on appropriate ports. In addition, you need to allow your internal users to access the protocols you configured into your inspection rule, as well as give them general TCP and UDP services.
CBAC must be used in conjunction with ACLs. Remember, your inspection rule was to permit your internal clients dynamic access to specified protocols and to generic TCP and UDP services on the external network, while protecting them from any unwanted attacks. Cisco recommends the following guidelines for applying rules and ACLs to interfaces:
On the interface where traffic initiates (in the corporate network example, the dirty DMZ):
Apply an ACL inward that permits only wanted traffic.
Apply the CBAC inspection rule in the inward direction that inspects wanted traffic.
On all other interfaces:
Apply an ACL in the inward direction that denies all other traffic except for traffic types not inspected by CBAC such as ICMP.
Let’s go ahead and do this on the Lab_B router using the following commands:
Lab_B#conf t
Lab_B(config)#access-list 150 permit ip 172.16.1.0 0.0.0.255 any
Lab_B(config)#access-list 150 deny ip any any
Lab_B(config)#int f0/0
Lab_B(config-if)#ip inspect IOSFW in
Lab_B(config-if)#ip access-group 150 in
Lab_B(config-if)#^Z
Lab_B#
So far, so good. You’ve defined an access list for the interface where traffic initiates that permits wanted traffic (the internal 172.16.1.0 network addresses—you’re assuming that the firewall is NATing other internal traffic). You’ve applied this ACL inbound on the internal interface and applied the CBAC inspection rule inbound on this same interface. So now let’s protect that external interface using the following commands:
Lab_B#conf t
Lab_B(config)#access-list 151 permit tcp any host 172.16.1.2 eq www
Lab_B(config)#access-list 151 permit udp any host 172.16.1.3 eq domain
Lab_B(config)#access-list 151 deny ip any any
Lab_B(config)#int s1/0
Lab_B(config-if)#ip access-group 151 in
Lab_B(config-if)#^Z
Lab_B#
If you aren’t familiar with CBAC, you might not like the looks of this—didn’t you just block everything coming in from the Internet except requests to the web server and the DNS server? The access-list 151 certainly makes it look as if you did! But remember that CBAC is listening to all incoming traffic on F0/0. So when user requests to the Internet arrive there, CBAC,
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

Introduction to CBAC Configuration 161
knowing those requests require responses, temporarily changes the ACL (151) to permit conversation between the local hosts and the Internet host. Once the conversation is over (or times out), CBAC removes the changes.
Suppose that a host on the Internet tries to access a local machine other than the web server or the DNS server. The request arrives at interface S1/0, but CBAC has no record of an open session between an internal host and that particular Internet host, and so it hasn’t changed the ACL. That packet is denied because the only exceptions to the ACL that will be allowed are those entered by CBAC. Any bad guys who try to make it seem as though they have an established TCP connection when they don’t will simply have their packets dropped!
The only items allowed in from the Internet are those allowed by ACL 151, which by default, allows access to the web server and the DNS server. CBAC adds entries so that servers contacted by your internal users can respond to user requests. But when your internal users aren’t accessing Internet services, CBAC leaves your network locked up tight!
Did I mention that it’s possible to configure both internal and external CBAC on the same router? Cool, huh?
Configuring IP ACLs at the Interface
For CBAC to work properly, you’ve got to have an ACL in place. Because CBAC dynamically makes changes to the ACL to permit the specific conversations it sees—you can see them too with the show ip access list command—the ACL needs to be an extended ACL. In the preceding example, you used access-list 151. You may need to have additional permit entries to allow traffic types that CBAC can’t predict, such as ICMP, for example.
Testing and Verifying CBAC
As with most IOS commands, there is a set of show and debug commands that allow you to test and verify the operation of CBAC. You can use the following commands to display CBAC operation:
The show ip inspect config command displays information about the entire global timeouts and thresholds configuration for CBAC as well as the inspection rule configuration, excluding interface information.
Lab_B#show ip inspect config
Session audit trail is enabled
Session alert is enabled
one-minute (sampling period) thresholds are [400:500] connections max-incomplete sessions thresholds are [400:500]
max-incomplete tcp connections per host is 50. Block-time 0 minute. tcp synwait-time is 30 sec -- tcp finwait-time is 5 sec
tcp idle-time is 3600 sec -- udp idle-time is 30 sec dns-timeout is 5 sec
Inspection Rule Configuration
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

162 Chapter 5 Context-Based Access Control Configuration
Inspection name IOSFW
ftp alert is on audit-trail is on timeout 3600 h323 alert is on audit-trail is on timeout 3600
http java-list 10 alert is on audit-trail is on timeout 3600 tcp alert is on audit-trail is on timeout 3600
udp alert is on audit-trail is on timeout 30
The show ip inspect interfaces command displays information about the interface configuration.
Lab_B#show ip inspect interfaces
Interface Configuration
Interface FastEthernet0/0
Inbound inspection rule is IOSFW
ftp alert is on audit-trail is on timeout 3600 h323 alert is on audit-trail is on timeout 3600
http java-list 10 alert is on audit-trail is on timeout 3600 tcp alert is on audit-trail is on timeout 3600
udp alert is on audit-trail is on timeout 30 Outgoing inspection rule is not set
Inbound access list is 150
Outgoing access list is not set
The show ip inspect name command displays information about the inspection rule configuration.
Lab_B#show ip inspect name IOSFW
Inspection name IOSFW
ftp alert is on audit-trail is on timeout 3600 h323 alert is on audit-trail is on timeout 3600
http java-list 10 alert is on audit-trail is on timeout 3600 tcp alert is on audit-trail is on timeout 3600
udp alert is on audit-trail is on timeout 30 Lab_B#
And you can remove any and all CBAC by doing the following:
Lab_B#conf t
Lab_B(config)#no ip inspect
Lab_B(config)#^Z
Lab_B#show ip inspect interfaces
Lab_B#
If you do this, you’ll wipe out all dynamic ACLs, reset all global timeouts, and delete all existing sessions—so be careful!
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |