
- •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

Introduction to CBAC Configuration 151
Introduction to CBAC Configuration
To help you set up and configure CBACs, Cisco has defined six steps for configuring CBAC:
1.Set audit trails and alerts.
2.Set global timeouts and thresholds.
3.Define Port-to-Application Mapping (PAM).
4.Define inspection rules.
5.Apply inspection rules and ACLs to interfaces.
6.Test and verify CBAC.
You’ll learn about each of these steps in detail throughout the rest of this chapter. The following graphic illustrates the network you’ll be working with and configuring:
Lab_A |
HostA HostB
172.16.2.0/24
|
Perimeter |
WWW Server |
DNS Server |
|
10.1.1.0/24 |
Router |
172.16.1.2/24 |
172.16.1.3/24 |
|
Internet |
|
|
|
|
|
Lab_B |
|
|
|
|
|
|
172.16.1.0/24 |
|
|
F0/0 |
"Dirty DMZ" |
|
|
172.16.1.254/24 |
|
|||
|
|
|
||
Protected DMZ |
|
|
|
|
|
PIX |
|
Bastion Host |
|
|
|
|
F0/0 |
|
|
|
192.168.254.254/24 |
|
|
Bastion Host |
|
|
|
|
NAS |
|
|
|
|
|
F0/0 |
|
|
|
192.168.254.252/24 |
|
|
|
|
|
CiscoSecure ACS 3.0 |
Management Station |
||
|
192.168.254.253/24 |
192.168.254.251/24 |
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

152 Chapter 5 Context-Based Access Control Configuration
First, you need to understand the configuration and the order of the steps you’ll take to build CBAC on the Lab_B router as you work through the examples in the rest of this chapter.
You’ll be configuring the border router Lab_B with CBAC to protect the internal network, and you’ll need to provide full access to both the web server and the DNS server from the Internet. You’re also going to allow all general TCP and UDP traffic out to the Internet from your internal hosts, but not anything else.
The next section describes how to set up auditing and real-time alerts from routers running CBAC.
Using Audit Trails and Alerts
If you need it to, CBAC can generate real-time alerts and audit trails through the use of a Syslog server. This is an especially cool, useful feature if you have multiple routers running CBAC, because it allows you to monitor all enterprise alerts and even audit trails at a single, centralized location.
Alerts are triggered when CBAC discovers any suspicious activity. They’re reported as Syslog error messages to the central Syslog server that you’ve specified. Alerts provide a record of suspected problems, and they can be used to trigger other real-time events on the Syslog server.
You can use audit trails to create a log of all inspected activities. Think of this as a record of any and all accesses, whether they’re a problem or not. Audit trails are useful if your security policy identifies a need to keep a record of all network traffic.
The following example shows how both audit trails and alerts would be configured on your Lab_B router, assuming that your Syslog server is at 192.168.254.251:
Lab_B#conf t
Lab_B(config)#logging on
Lab_B(config)#logging 192.168.254.251
Lab_B(config)#ip inspect audit-trail
Lab_B(config)#no ip inspect alert-off
The no version of the ip inspect alert-off command enables alerts. Removing the no disables alerts. Likewise, the no version of the ip inspect audit-trail command disables the audit trail.
Great! You’re now logging both alerts and audit trails to your Syslog server. The next step is to configure global timeouts and thresholds.
Configuring Global Timeouts and Thresholds
CBAC uses global timeouts and thresholds to determine how long to preserve state information for all sessions, established or otherwise. You can use the defaults—and you need to know what these are—or you can modify them to meet your individual needs. If you’re going to change them, do it now before proceeding with any further CBAC configuration tasks.
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

Introduction to CBAC Configuration 153
Table 5.1 lists the commands you use to modify the default values and then describes the timeout or threshold and its default value. Once set, these values can be restored to default values by using the no form of the command, as in the following example:
Lab_B#conf t
Lab_B(config)#ip inspect tcp synwait-time 60
The default time of 30 seconds has now been changed to 60 seconds.
Lab_B(config)#no ip inspect tcp synwait-time 60
The default of 30 seconds has now been restored.
T A B L E 5 . 1 Some Commands for Changing CBAC Timeouts and Thresholds
Command |
Description |
|
|
ip inspect tcp synwait-time |
Sets how long CBAC will wait for a TCP session |
|
to be established before dropping the session. |
|
The default is 30 seconds. |
ip inspect tcp finwait-time |
Sets how long CBAC will wait after a TCP FIN |
|
before dropping the session. The default is |
|
5 seconds. |
ip inspect tcp idle-time |
Sets how long CBAC will maintain an idle |
|
TCP connection. The default is 1 hour (3600 |
|
seconds). |
ip inspect udp idle-time |
Sets how long CBAC will maintain idle UDP |
|
sessions. The default is 30 seconds. |
ip inspect dns-timeout |
Sets how long CBAC will maintain an idle DNS |
|
name lookup session. The default is 5 seconds. |
ip inspect max-incomplete high |
Sets the maximum number of half-opened |
|
connections that CBAC will allow before it starts |
|
deleting them. The default is 500. |
ip inspect max-incomplete low |
Sets the number to go below before CBAC |
|
stops deleting half-open connections, once it |
|
starts deleting these connections. The default |
|
is 400. |
ip inspect one-minute high |
Sets the rate of new, half-open connections that |
|
will trigger CBAC to start deleting them. The |
|
default is 500 per minute. |
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

154 |
Chapter 5 Context-Based Access Control Configuration |
|
T A B L E |
5 . 1 Some Commands for Changing CBAC Timeouts and Thresholds (continued) |
|
|
|
|
Command |
Description |
|
|
|
|
ip inspect one-minute low |
Sets the rate to go below before CBAC |
|
|
|
stops deleting half-open connections, once it |
|
|
starts deleting these connections. The default |
|
|
is 400 per minute. |
ip inspect tcp max-incomplete host |
Sets the maximum number of half-open connec- |
|
|
|
tions to the same host that CBAC will allow |
|
|
before starting to drop them. The default is 50. |
|
|
|
Most of these commands should be familiar to you, but a few deserve special mention.
ip inspect max-incomplete These values can monitor both TCP and UDP sessions. Incomplete TCP sessions are defined as sessions where the three-way handshake hasn’t been completed. Incomplete UDP sessions are defined as sessions where no return traffic has been detected. Once the maximum number of incomplete sessions is reached, CBAC begins deleting half-open sessions until their numbers total below the minimum value.
ip inspect one-minute These commands are similar in operation, except instead of monitoring the total number of incomplete TCP or UDP sessions, they monitor the rate at which incomplete TCP or UDP sessions are being established. A sudden surge in incomplete sessions can trigger CBAC to aggressively close them, which it does until the low threshold is reached.
Let’s leave the defaults on the Lab_B router and continue on to the Port-to-Application Mapping section.
Configuring PAM
You ask, and Cisco delivers! Previous versions of CBAC assumed that applications were always hosted on the same, well-known port. Live and learn. In the real world, this isn’t always the case. Haven’t you all set up a rogue web server on some obscure port? Port-to-Application Mapping (PAM) allows you to modify the default values of well-known ports, and thus teach CBAC how to recognize these familiar apps in their new homes. Check out the default PAM mappings in Table 5.2.
T A B L E 5 . 2 |
Default Application Mappings |
|
|
Application |
Port |
|
|
Cuseeme |
7648 |
Exec |
512 |
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

|
Introduction to CBAC Configuration |
155 |
T A B L E 5 . 2 |
Default Application Mappings (continued) |
|
|
|
|
Application |
Port |
|
|
|
|
ftp |
21 |
|
http |
80 |
|
h323 |
1720 |
|
login |
513 |
|
mgcp |
2427 |
|
msrpc |
135 |
|
netshow |
1755 |
|
realmedia |
7070 |
|
rtsp |
554 |
|
rtsp |
8554 |
|
shell |
514 |
|
sip |
5060 |
|
smtp |
25 |
|
sql-net |
1521 |
|
streamworks |
1558 |
|
sunrpc |
111 |
|
telnet |
23 |
|
tftp |
69 |
|
vdolive |
7000 |
|
|
|
|
Okay, so these are the defaults. But what if you have an HTTP server running on port 8000? That’s where PAM comes in. PAM allows you to map these applications or services to the ports
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

156 Chapter 5 Context-Based Access Control Configuration
that you’re really using and still get to enjoy all of CBAC’s capabilities. The available options in your configuration look like this:
Lab_B#conf t
Lab_B(config)#ip port-map ?
cuseeme |
CUSeeMe Protocol |
dns |
Domain Name Server |
exec |
Remote Process Execution |
finger |
Finger |
ftp |
File Transfer Protocol |
gopher |
Gopher |
h323 |
H.323 Protocol (e.g, MS NetMeeting, Intel Video Phone) |
http |
Hypertext Transfer Protocol |
imap |
Internet Message Access Protocol |
kerberos |
Kerberos |
ldap |
Lightweight Directory Access Protocol |
login |
Remote login |
lotusnote |
Lotus Note |
mgcp |
Media Gateway Control Protocol |
ms-sql |
Microsoft SQL |
msrpc |
Microsoft Remote Procedure Call |
netshow |
Microsoft NetShow |
nfs |
Network File System |
nntp |
Network News Transfer Protocol |
pop2 |
Post Office Protocol - Version 2 |
pop3 |
Post Office Protocol - Version 3 |
realmedia |
RealNetwork's Realmedia Protocol |
rtsp |
Real Time Streaming Protocol |
sap |
SAP |
shell |
Remote command |
sip |
Session Initiation Protocol |
smtp |
Simple Mail Transfer Protocol |
snmp |
Simple Network Management Protocol |
sql-net |
SQL-NET |
streamworks |
StreamWorks Protocol |
sunrpc |
SUN Remote Procedure Call |
sybase-sql |
Sybase SQL |
tacacs |
Login Host Protocol (TACACS) |
telnet |
Telnet |
tftp |
Trivial File Transfer Protocol |
vdolive |
VDOLive Protocol |
Lab_B(config)#ip port-map http port 8000
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |

Introduction to CBAC Configuration 157
Configuring options such as these modifies the default port-mapping of HTTP. You can create multiple ports for the same application, but you’ll receive a warning if you try to map an application to the well-known port of another application. You can use the no version of the ip port-map command to remove the configuration, and you can use the show ip port-map command to review the changes and current PAM settings:
Lab_B(config)#^Z |
|
|
Lab_B#show ip port-map |
|
|
Default mapping: vdolive |
port 7000 |
system defined |
Default mapping: sunrpc |
port 111 |
system defined |
Default mapping: netshow |
port 1755 |
system defined |
Default mapping: cuseeme |
port 7648 |
system defined |
Default mapping: tftp |
port 69 |
system defined |
Default mapping: rtsp |
port 8554 |
system defined |
Default mapping: realmedia |
port 7070 |
system defined |
Default mapping: streamworks |
port 1558 |
system defined |
Default mapping: ftp |
port 21 |
system defined |
Default mapping: telnet |
port 23 |
system defined |
Default mapping: rtsp |
port 554 |
system defined |
Default mapping: h323 |
port 1720 |
system defined |
Default mapping: sip |
port 5060 |
system defined |
Default mapping: smtp |
port 25 |
system defined |
Default mapping: http |
port 80 |
system defined |
Default mapping: msrpc |
port 135 |
system defined |
Default mapping: exec |
port 512 |
system defined |
Default mapping: login |
port 513 |
system defined |
Default mapping: sql-net |
port 1521 |
system defined |
Default mapping: shell |
port 514 |
system defined |
Default mapping: mgcp |
port 2427 |
system defined |
Default mapping: http |
port 8000 |
user defined |
Lab_B# |
|
|
Did you notice that the HTTP mapping on port 8000 is user-defined, but all the other ports are system-defined? You can also set additional parameters for this command to get more than just one application or port, as follows:
Lab_B#show ip port-map http |
|
|
Default mapping: http |
port 80 |
system defined |
Default mapping: http |
port 8000 |
user defined |
Lab_B#show ip port-map port 8000 |
|
|
Default mapping: http |
port 8000 |
user defined |
Lab_B# |
|
|
Copyright ©2003 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. |
www.sybex.com |