Zone Design Guide
Zone Design Guide
Application Guide
Document ID: 98628
Introduction
Prerequisites
Requirements
Components Used
Conventions
Zone−Based Policy Overview
Zone−Based Policy Configuration Model
Rules For Applying Zone−Based Policy Firewall
Designing Zone−Based Policy Network Security
Using IPSec VPN with Zone−Based Policy Firewall
Cisco Policy Language (CPL) Configuration
Configuring Zone−Based Policy Firewall Class−Maps
Configuring Zone−Based Policy Firewall Policy−Maps
Configuring Zone−Policy Firewall Parameter−Maps
Applying Logging For Zone−Based Policy Firewall Policies
Editing Zone−Policy Firewall Class−Maps and Policy−Maps
Configuration Examples
Stateful Inspection Routing Firewall
Stateful Inspection Transparent Firewall
Rate Policing For Zone−Based Policy Firewall
URL Filtering
Controlling Access to the Router
Zone−Based Firewall and Wide−Area Application Services
Monitoring Zone−Based Policy Firewall with show and debug Commands
Tuning Zone−Based Policy Firewall Denial−of−Service Protection
Appendix
Appendix A: Basic Configuration
Appendix B: Final (Complete) Configuration
Appendix C: Basic Zone−Policy Firewall Configuration for Two Zones
Related Information
Introduction
Cisco IOS® Software Release 12.4(6)T introduced Zone−Based Policy Firewall (ZFW), a new configuration
model for the Cisco IOS Firewall feature set. This new configuration model offers intuitive policies for
multiple−interface routers, increased granularity of firewall policy application, and a default deny−all policy
that prohibits traffic between firewall security zones until an explicit policy is applied to allow desirable
traffic.
Nearly all classic Cisco IOS Firewall features implemented before Cisco IOS Software Release 12.4(6)T are
supported in the new zone−based policy inspection interface:
• HTTP
• Post Office Protocol (POP3), Internet Mail Access Protocol (IMAP), Simple Mail Transfer
Protocol/Enhanced Simple Mail Transfer Protocol (SMTP/ESMTP)
• Sun Remote Procedure Call (RPC)
• Instant Messaging (IM) applications:
♦ Microsoft Messenger
♦ Yahoo! Messenger
♦ AOL Instant Messenger
• Peer−to−Peer (P2P) File Sharing:
♦ Bittorrent
♦ KaZaA
♦ Gnutella
♦ eDonkey
Cisco IOS Software Release 12.4(11)T added statistics for easier DoS protection tuning.
Some Cisco IOS Classic Firewall features and capabilities are not yet supported in a ZFW in Cisco IOS
Software Release 12.4(15)T:
• Authentication proxy
• Stateful firewall failover
• Unified firewall MIB
• IPv6 stateful inspection
• TCP out−of−order support
ZFW generally improves Cisco IOS performance for most firewall inspection activities.
Neither Cisco IOS ZFW or Classic Firewall include stateful inspection support for multicast traffic.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
Zone−Based Policy Firewall (also known as Zone−Policy Firewall, or ZFW) changes the firewall
configuration from the older interface−based model to a more flexible, more easily understood zone−based
model. Interfaces are assigned to zones, and inspection policy is applied to traffic moving between the zones.
Inter−zone policies offer considerable flexibility and granularity, so different inspection policies can be
applied to multiple host groups connected to the same router interface.
Firewall policies are configured with the Cisco® Policy Language (CPL), which employs a hierarchical
structure to define inspection for network protocols and the groups of hosts to which the inspection will be
applied.
The first major change to the firewall configuration is the introduction of zone−based configuration. Cisco
IOS Firewall is the first Cisco IOS Software threat defense feature to implement a zone configuration model.
Other features might adopt the zone model over time. Cisco IOS Classic Firewall stateful inspection (or
CBAC) interface−based configuration model that employs the ip inspect command set is maintained for a
period of time. However, few, if any, new features are configurable with the classical command−line interface
(CLI). ZFW does not use the stateful inspection or CBAC commands. The two configuration models can be
used concurrently on routers, but not combined on interfaces. An interface cannot be configured as a security
zone member as well as being configured for ip inspect simultaneously.
Zones establish the security borders of your network. A zone defines a boundary where traffic is subjected to
policy restrictions as it crosses to another region of your network. ZFWs default policy between zones is
deny all. If no policy is explicitly configured, all traffic moving between zones is blocked. This is a significant
departure from stateful inspections model where traffic was implicitly allowed until explicitly blocked with
an access control list (ACL).
The second major change is the introduction of a new configuration policy language known as CPL. Users
familiar with the Cisco IOS Software Modular quality−of−service (QoS) CLI (MQC) might recognize that the
format is similar to QoSs use of class maps to specify which traffic will be affected by the action applied in a
policy map.
Each interface in this network will be assigned to its own zone, although you might want to allow varied
access from the public Internet to specific hosts in the DMZ and varied application use policies for hosts in
the protected LAN. (See Figure 1.)
In this example, each zone holds only one interface. If an additional interface is added to the private zone, the
hosts connected to the new interface in the zone can pass traffic to all hosts on the existing interface in the
same zone. Additionally, the hosts traffic to hosts in other zones is similarly affected by existing policies.
Because the DMZ is exposed to the public Internet, the DMZ hosts might be subjected to undesired activity
from malicious individuals who might succeed at compromising one or more DMZ hosts. If no access policy
is provided for DMZ hosts to reach either private zone hosts or Internet zone hosts, then the individuals who
compromised the DMZ hosts cannot use the DMZ hosts to carry out further attack against private or Internet
hosts. ZFW imposes a prohibitive default security posture. Therefore, unless the DMZ hosts are specifically
provided access to other networks, other networks are safeguarded against any connections from the DMZ
hosts. Similarly, no access is provided for Internet hosts to access the private zone hosts, so private zone hosts
are safe from unwanted access by Internet hosts.
If a non−VTI IPSec is applied, VPN connectivity firewall policy requires close scrutiny to maintain security.
The zone policy must specifically allow access by an IP address for remote sites hosts or VPN clients if
secure hosts are in a different zone than the VPN clients encrypted connection to the router. If the access
policy is not properly configured, hosts that should be protected can end up exposed to unwanted, potentially
hostile hosts. Refer to Using VPN with Zone−Based Policy Firewall for further concept and configuration
discussion.
1. Define zones.
2. Define zone−pairs.
3. Define class−maps that describe traffic that must have policy applied as it crosses a zone−pair.
4. Define policy−maps to apply action to your class−maps traffic.
5. Apply policy−maps to zone−pairs.
6. Assign interfaces to zones.
• Access−groupA standard, extended, or named ACL can filter traffic based on source and destination
IP address and source and destination port.
• ProtocolThe Layer 4 protocols (TCP, UDP, and ICMP) and application services such as HTTP,
SMTP, DNS, etc. Any well−known or user−defined service known to Port−Application Mapping can
be specified.
• Class−mapA subordinate class−map that provides additional match criteria can be nested inside
another class−map.
• NotThe not criterion specifies that any traffic that does not match a specified service (protocol),
access−group or subordinate class−map will be selected for the class−map.
Class−maps can apply match−any or match−all operators to determine how to apply the match criteria. If
match−any is specified, traffic must meet only one of the match criteria in the class−map. If match−all is
specified, traffic must match all of the class−maps criteria in order to belong to that particular class.
Match criteria must be applied in order from more specific to less specific, if traffic meets multiple criteria.
For example, consider this class−map:
HTTP traffic must encounter the match protocol http first to make sure the traffic is handled by the
service−specific capabilities of HTTP inspection. If the match lines are reversed, so traffic encounters the
match protocol tcp statement before it compares it to match protocol http, the traffic is simply classified as
TCP traffic, and inspected according to the capabilities of the Firewalls TCP Inspection component. This is a
problem for certain services such as FTP, TFTP, and several multimedia and voice signaling services such as
H.323, SIP, Skinny, RTSP, and others. These services require additional inspection capabilities to recognize
the more complex activities of these services.
Class−maps can apply an ACL as one of the match criteria for policy application. If a class−maps only
match criterion is an ACL and the class−map is associated with a policy−map applying the inspect action, the
router applies basic TCP or UDP inspection for all traffic allowed by the ACL, except that which ZFW
provides application−aware inspection. This includes (but not limited to) FTP, SIP, Skinny (SCCP), H.323,
Sun RPC, and TFTP. If application−specific inspection is available and the ACL allows the primary or control
channel, any secondary or media channel associated with the primary/control is allowed, regardless of
whether the ACL allows the traffic.
If a class−map applies only ACL 101 as the match criteria, an ACL 101 appears as this:
All traffic is allowed in the direction of the service−policy applied to a given zone−pair, and corresponding
return traffic is allowed in the opposite direction. Therefore, the ACL must apply the restriction to limit traffic
to specific desired types. Note that the PAM list includes application services such as HTTP, NetBIOS,
H.323, and DNS. However, in spite of PAMs knowledge of the specific applications use of a given port,
firewall only applies sufficient application−specific capability to accommodate the well−known requirements
of the application traffic. Thus, simple application traffic such as telnet, SSH, and other single−channel
applications are inspected as TCP, and their statistics are combined together in the show command output. If
application−specific visibility into network activity is desired, you need to configure inspection for services
by application name (configure match protocol http, match protocol telnet, etc.).
Compare the statistics available in the show policy−map type inspect zone−pair command output from this
configuration with the more explicit firewall policy shown further down the page. This configuration is used
to inspect traffic from a Cisco IP Phone, as well as several workstations that use a variety of traffic, which
includes http, ftp, netbios, ssh, and dns:
While this configuration is easy to define and accommodates all traffic that originates in the private zone (as
long as the traffic observes the standard, PAM−recognized destination ports), it provides limited visibility into
service activity, and does not offer the opportunity to apply ZFWs bandwidth and session limits for specific
types of traffic. This show policy−map type inspect zone−pair priv−pub command output is the result of
the previous simple configuration that uses only a permit ip [subnet] any ACL between zone−pairs. As you
can see, most of workstation traffic is counted in the basic TCP or UDP statistics:
By contrast, a similar configuration that adds application−specific classes provides more granular application
statistics and control, and still accommodates the same breadth of services that was shown in the first example
by defining the last−chance class−map matching only the ACL as the last chance in the policy−map:
class−map type inspect match−all all−private
match access−group 101
class−map type inspect match−all private−ftp
match protocol ftp
match access−group 101
class−map type inspect match−any netbios
match protocol msrpc
match protocol netbios−dgm
match protocol netbios−ns
match protocol netbios−ssn
class−map type inspect match−all private−netbios
match class−map netbios
match access−group 101
class−map type inspect match−all private−ssh
match protocol ssh
match access−group 101
class−map type inspect match−all private−http
match protocol http
match access−group 101
!
policy−map type inspect priv−pub−pmap
class type inspect private−http
inspect
class type inspect private−ftp
inspect
class type inspect private−ssh
inspect
class type inspect private−netbios
inspect
class type inspect all−private
inspect
class class−default!
zone security private
zone security public
zone−pair security priv−pub source private destination public
service−policy type inspect priv−pub−pmap
!
interface FastEthernet4
ip address 172.16.108.44 255.255.255.0
zone−member security public
!
interface Vlan1
ip address 192.168.108.1 255.255.255.0
zone−member security private
!
access−list 101 permit ip 192.168.108.0 0.0.0.255 any
The more−specific configuration provides this substantial granular output for the show policy−map type
inspect zone−pair priv−pub command:
Another added benefit of using a more granular class−map and policy−map configuration, as mentioned
earlier, is the possibility of applying class−specific limits on session and rate values and specifically adjusting
inspection parameters by applying a parameter−map to adjust each classs inspection behavior.
ZFW provides three actions for traffic that traverses from one zone to another:
• DropThis is the default action for all traffic, as applied by the "class class−default" that terminates
every inspect−type policy−map. Other class−maps within a policy−map can also be configured to
drop unwanted traffic. Traffic that is handled by the drop action is "silently" dropped (i.e., no
notification of the drop is sent to the relevant end−host) by the ZFW, as opposed to an ACL's
behavior of sending an ICMP host unreachable message to the host that sent the denied traffic.
Currently, there is not an option to change the "silent drop" behavior. The log option can be added
with drop for syslog notification that traffic was dropped by the firewall.
• PassThis action allows the router to forward traffic from one zone to another. The pass action does
not track the state of connections or sessions within the traffic. Pass only allows the traffic in one
direction. A corresponding policy must be applied to allow return traffic to pass in the opposite
direction. The pass action is useful for protocols such as IPSec ESP, IPSec AH, ISAKMP, and other
inherently secure protocols with predictable behavior. However, most application traffic is better
handled in the ZFW with the inspect action.
• InspectThe inspect action offers state−based traffic control. For example, if traffic from the private
zone to the Internet zone in the earlier example network is inspected, the router maintains connection
or session information for TCP and User Datagram Protocol (UDP) traffic. Therefore, the router
permits return traffic sent from Internet−zone hosts in reply to private zone connection requests. Also,
inspect can provide application inspection and control for certain service protocols that might carry
vulnerable or sensitive application traffic. Audit−trail can be applied with a parameter−map to record
connection/session start, stop, duration, the data volume transferred, and source and destination
addresses.
conf t
policy−map type inspect z1−z2−pmap
class type inspect service−cmap
inspect|drop|allow [service−parameter−map]
Parameter−maps offer options to modify the connection parameters for a given class−maps inspection
policy.
Inspection parameter−maps for ZFW are configured as type inspect, similar to other ZFW class and
policy−objects:
Specific types of parameter−maps specify parameters applied by Layer 7 application inspection policies.
Regex−type parameter−maps define a regular expression for use with HTTP application inspection that filters
traffic using a regular expression:
Protocol−info−type parameter−maps define server names for use with instant messaging application
inspection:
Complete configuration details for HTTP and IM application inspection are provided in the respective
application inspection sections of this document.
conf t
policy−map type inspect z1−z2−pmap
class type inspect service−cmap
inspect|drop|allow [parameter−map−name (optional)]
Drop logging is available for traffic that the ZFW drops. Drop logging is configured by adding log with the
drop action in a policy−map:
conf t
policy−map type inspect z1−z2−pmap
class type inspect service−cmap
inspect|drop|allow [service−parameter−map]
1. Copy the existing structure to a text editor such as Microsoft Windows Notepad, or an editor such as
vi on Linux/Unix platforms.
2. Remove the existing structure from the routers configuration.
3. Edit the structure in your text editor.
4. Copy the structure back to the routers CLI.
Configuration Examples
This configuration example employs a Cisco 1811 Integrated Services Router. A basic configuration with IP
connectivity, VLAN configuration, and transparent bridging between two private Ethernet LAN segments is
available in Appendix A. The router is separated into five zones:
• Hosts in Internet zone can reach DNS, SMTP, and SSH services on one server in the DMZ. The other
server will offer SMTP, HTTP, and HTTPS services. The firewall policy will restrict access to the
specific services available on each host.
• The DMZ hosts cannot connect to hosts in any other zone.
• Hosts in the client zone can connect to hosts in the server zone on all TCP, UDP, and ICMP services.
• Hosts in the server zone cannot connect to hosts in the client zone, except a UNIX−based application
server can open X Windows client sessions to X Windows servers on desktop PCs in the client zone
on ports 6900 to 6910.
• All hosts in the private zone (combination of clients and servers) can access hosts in the DMZ on
SSH, FTP, POP, IMAP, ESMTP, and HTTP services, and in the Internet zone on HTTP, HTTPS, and
DNS services and ICMP. Furthermore, application inspection will be applied on HTTP connections
from the private zone to the Internet zone in order to assure that supported instant messaging and P2P
applications are not carried on port 80. (See Figure 3.)
Because you will apply portions of the configuration to different network segments at different times, it is
important to remember that a network segment will lose connectivity to other segments when it is placed in a
zone. For instance, when the private zone is configured, hosts in the private zone will lose connectivity to the
DMZ and Internet zones until their respective policies are defined.
The private Internet policy applies Layer 4 inspection to HTTP, HTTPS, DNS, and Layer 4 inspection for
ICMP from the private zone to the Internet zone. This allows connections from the private zone to the Internet
zone, and allows the return traffic. Layer 7 inspection carries the advantages of tighter application control,
better security, and support for applications requiring fixup. However, Layer 7 inspection, as mentioned,
requires a better understanding of network activity, as Layer 7 protocols that are not configured for inspection
will not be allowed between zones.
1. Define class−maps that describe the traffic that you want to permit between zones, according to
policies described earlier:
conf t
class−map type inspect match−any internet−traffic−class
match protocol http
match protocol https
match protocol dns
match protocol icmp
2. Configure a policy−map to inspect traffic on the class−maps you just defined:
conf t
policy−map type inspect private−internet−policy
class type inspect internet−traffic−class
inspect
3. Configure the private and Internet zones and assign router interfaces to their respective zones:
conf t
zone security private
zone security internet
int bvi1
zone−member security private
int fastethernet 0
zone−member security internet
4. Configure the zone−pair and apply the appropriate policy−map.
Note: You only need to configure the private Internet zone pair at present in order to inspect
connections sourced in the private zone traveling to the Internet zone:
conf t
zone−pair security private−internet source private destination internet
service−policy type inspect private−internet−policy
This completes the configuration of the Layer 7 inspection policy on the private Internet zone−pair to
allow HTTP, HTTPS, DNS, and ICMP connections from the clients zone to the servers zone and to
apply application inspection to HTTP traffic to assure that unwanted traffic is not allowed to pass on
TCP 80, HTTPs service port.
The private DMZ policy adds complexity because it requires a better understanding of the network traffic
between zones. This policy applies Layer 7 inspection from the private zone to the DMZ. This allows
connections from the private zone to the DMZ, and allows the return traffic. Layer 7 inspection carries the
advantages of tighter application control, better security, and support for applications requiring fixup.
However, Layer 7 inspection, as mentioned, requires a better understanding of network activity, as Layer 7
protocols that are not configured for inspection will not be allowed between zones.
1. Define class−maps that describe the traffic that you want to permit between zones, according to
policies described earlier:
conf t
class−map type inspect match−any L7−inspect−class
match protocol ssh
match protocol ftp
match protocol pop
match protocol imap
match protocol esmtp
match protocol http
2. Configure policy−maps to inspect traffic on the class−maps you just defined:
conf t
policy−map type inspect private−dmz−policy
class type inspect L7−inspect−class
inspect
3. Configure the private and DMZ zones and assign router interfaces to their respective zones:
conf t
zone security private
zone security dmz
int bvi1
zone−member security private
int fastethernet 1
zone−member security dmz
4. Configure the zone−pair and apply the appropriate policy−map.
Note: You only need to configure the private DMZ zone−pair at present in order to inspect
connections sourced in the private zone traveling to the DMZ:
conf t
zone−pair security private−dmz source private destination dmz
service−policy type inspect private−dmz−policy
This completes the configuration of the Layer 7 inspection policy on the private DMZ to allow all
TCP, UDP, and ICMP connections from the clients zone to the servers zone. The policy does not
apply fixup for subordinate channels, but provides an example of simple policy to accommodate most
application connections.
1. Define class−maps and ACLs that describe the traffic that you want to permit between zones,
according to policies described earlier.
Multiple class−maps for services must be used, as differing access policies will be applied for access
to two different servers. Internet hosts are allowed DNS and HTTP connections to 172.16.2.2, and
SMTP connections are allowed to 172.16.2.3. Note the difference in the class−maps. The class−maps
specifying services use the match−any keyword to allow any of the listed services. The class−maps
associating ACLs with the service class−maps use the match−all keyword to require that both
conditions in the class map must be met to allow traffic:
conf t
access−list 110 permit ip any host 172.16.2.2
access−list 111 permit ip any host 172.16.2.3
class−map type inspect match−any dns−http−class
match protocol dns
match protocol http
class−map type inspect match−any smtp−class
match protocol smtp
class−map type inspect match−all dns−http−acl−class
match access−group 110
match class−map dns−http−class
class−map type inspect match−all smtp−acl−class
match access−group 111
match class−map smtp−class
2. Configure policy−maps to inspect traffic on the class−maps you just defined:
conf t
policy−map type inspect internet−dmz−policy
class type inspect dns−http−acl−class
inspect
class type inspect smtp−acl−class
inspect
3. Configure the Internet and DMZ zones and assign router interfaces to their respective zones. Skip the
DMZ configuration if you set it up in the previous section:
conf t
zone security internet
zone security dmz
int fastethernet 0
zone−member security internet
int fastethernet 1
zone−member security dmz
4. Configure the zone−pair and apply the appropriate policy−map.
Note: You only need to configure the Internet DMZ zone pair at present, to inspect connections
sourced in the Internet zone traveling to the DMZ zone:
conf t
zone−pair security internet−dmz source internet destination dmz
service−policy type inspect internet−dmz−policy
This completes the configuration of the address−specific Layer 7 inspection policy on the Internet
DMZ zone−pair.
The servers−clients policy applies inspection using a user−defined service. Layer 7 inspection is applied from
the servers zone to the clients zone. This allows X Windows connections to a specific port range from the
servers zone to the clients zone, and allows the return traffic. X Windows is not a natively supported protocol
in PAM, so a user−configured service in PAM must be defined so the ZFW can recognize and inspect the
appropriate traffic.
Two or more router interfaces are configured in an IEEE bridge−group to provide Integrated Routing and
Bridging (IRB) to provide bridging between the interfaces in the bridge−group and routing to other subnets
via the Bridge Virtual Interface (BVI). The transparent firewall policy will offer apply firewall inspection for
traffic crossing the bridge, but not for traffic that leaves the bridge−group via the BVI. The inspection
policy only applies to traffic crossing the bridge−group. Therefore, in this scenario, the inspection will only be
applied to traffic that moves between the clients and servers zones, which are nested inside the private zone.
The policy applied between the private zone, and public and DMZ zones, only comes into play when traffic
leaves the bridge−group via the BVI. When traffic leaves via the BVI from either the clients or servers zones,
the transparent firewall policy will not be invoked.
X Windows clients (where applications are hosted) open connections for display information to
clients (where user is working) in a range starting at port 6900.
Each additional connection uses successive ports, so if a client displays 10 different sessions on one
host, the server uses ports 6900−6909. Therefore, if you inspect the port range from 6900 to 6909,
connections opened to ports beyond 6909 will fail:
conf t
ip port−map user−Xwindows port tcp from 6900 to 6910
2. Review PAM documents to address additional PAM questions or check granular protocol inspection
documentation for information about the details of interoperability between PAM and Cisco IOS
Firewall stateful inspection.
3. Define class−maps that describe the traffic that you want to permit between zones, according to
policies described earlier:
conf t
class−map type inspect match−any Xwindows−class
match protocol user−Xwindows
4. Configure policy−maps to inspect traffic on the class−maps you just defined:
conf t
policy−map type inspect servers−clients−policy
class type inspect Xwindows−class
inspect
5. Configure the client and server zones and assign router interfaces to their respective zones.
If you configured these zones and assigned interfaces in the Clients−Servers Policy Configuration
section, you can skip to the zone−pair definition. Bridging IRB configuration is provided for
completeness:
conf t
bridge irb
bridge 1 protocol ieee
bridge 1 route ip
zone security clients
zone security servers
int vlan 1
bridge−group 1
zone−member security clients
int vlan 2
bridge−group 1
zone−member security servers
6. Configure the zone−pair and apply the appropriate policy−map.
Note: You only need to configure the servers−clients zone pair at present in order to inspect
connections sourced in the servers zone traveling to the clients zone:
conf t
zone−pair security servers−clients source servers destination clients
service−policy type inspect servers−clients−policy
This completes the configuration of the user−defined inspection policy in the servers−clients
zone−pair to allow X Windows connections from the server zone to the client zone.
The client−servers policy is less complex than the others. Layer 4 inspection is applied from the clients zone
to the servers zone. This allows connections from the clients zone to the servers zone, and allows return
traffic. Layer 4 inspection carries the advantage of simplicity in the firewall configuration, in that only a few
rules are required to allow most application traffic. However, Layer 4 inspection also carries two major
disadvantages:
• Applications such as FTP or streaming media services frequently negotiate an additional subordinate
channel from the server to the client. This functionality is usually accommodated in a service fixup
that monitors the control channel dialog and allows the subordinate channel. This capability is not
available in Layer 4 inspection.
• Layer 4 inspection allows nearly all application−layer traffic. If network use must be controlled so
only a few applications are permitted through the firewall, an ACL must be configured on outbound
traffic to limit the services allowed through the firewall.
Both router interfaces are configured in an IEEE bridge group, so this firewall policy will apply transparent
firewall inspection. This policy is applied on two interfaces in an IEEE IP bridge group. The inspection policy
only applies to traffic crossing the bridge group. This explains why the clients and servers zones are nested
inside the private zone.
1. Define class−maps that describe the traffic that you want to permit between zones, according to
policies described earlier:
conf t
class−map type inspect match−any L4−inspect−class
match protocol tcp
match protocol udp
match protocol icmp
2. Configure policy−maps to inspect traffic on the class−maps you just defined:
conf t
policy−map type inspect clients−servers−policy
class type inspect L4−inspect−class
inspect
3. Configure the clients and servers zones and assign router interfaces to their respective zones:
conf t
zone security clients
zone security servers
int vlan 1
zone−member security clients
int vlan 2
zone−member security servers
4. Configure the zone−pair and apply the appropriate policy−map.
Note: You only need to configure the clients−servers zone−pair at present, to inspect connections
sourced in the clients zone traveling to the servers zone:
conf t
zone−pair security clients−servers source clients destination servers
service−policy type inspect clients−servers−policy
This completes the configuration of the Layer 4 inspection policy for the clients−servers zone−pair to
allow all TCP, UDP, and ICMP connections from the client zone to the server zone. The policy does
not apply fixup for subordinate channels, but provides an example of simple policy to accommodate
most application connections.
Cisco IOS Software Release 12.4(9)T augments ZFW with rate−limiting by adding the capability to police
traffic matching the definitions of a specific class−map as it traverses the firewall from one security zone to
another. This provides the convenience of offering one configuration point to describe specific traffic, apply
firewall policy, and police that traffics bandwidth consumption. ZFW policing differs from interface−based
policing in that it only provides the actions transmit for policy conformance and drop for policy violation.
ZFW policing cannot mark traffic for DSCP.
ZFW policing can only specify bandwidth use in bytes/second, packet/second and bandwidth percentage
policing are not offered. ZFW policing can be applied with or without interface−based policing. Therefore, if
additional policing capabilities are required, these features can be applied by interface−based policing. If
interface−based policing is used in conjunction with firewall policing, make certain that the policies do not
conflict.
ZFW policing limits traffic in a policy−maps class−map to a user−defined rate value between 8,000 and
2,000,000,000 bits per second, with a configurable burst value in the range of 1,000 to 512,000,000 bytes.
ZFW policing is configured by an additional line of configuration in the policy−map, which is applied after
the policy action:
Session Control
ZFW policing also introduced session control to limit the session count for traffic in a policy−map matching a
class−map. This adds to the existing capability to apply DoS protection policy per class−map. Effectively, this
allows granular control on the number of sessions matching any given class−map that cross a zone−pair. If the
same class−map is used on multiple policy−maps or zone−pairs, different session limits can be applied on the
various class−map applications.
Session control is applied by configuring a parameter−map that contains the desired session volume, then
appending the parameter−map to the inspection action applied to a class−map under a policy−map:
Parameter−maps can only be applied to the inspect action, and are not available on pass or drop actions.
ZFWs session control and policing activities are visible with this command
Application Inspection
Application inspection introduces additional capability to ZFW. Application inspection policies are applied at
Layer 7 of the OSI model, where user applications send and receive messages that allow the applications to
offer useful capabilities. Some applications might offer undesired or vulnerable capabilities, so the messages
associated with these capabilities must be filtered to limit activities on the application services.
Cisco IOS Software ZFW offers application inspection and control on these application services:
• HTTP
• SMTP
• POP3
• IMAP
• Sun RPC
• P2P Application Traffic
• IM Applications
Application inspection and control (AIC) varies in capability per service. HTTP inspection offers granular
filtering on several types of application activity, offering capabilities to limit transfer size, web address
lengths, and browser activity to enforce compliance with application−behavior standards and to limit types of
content that are transferred over the service. AIC for SMTP can limit content length and enforce protocol
compliance. POP3 and IMAP inspection can help ensure that users are using secure authentication
mechanisms to prevent compromise of user credentials.
Application inspection is configured as an additional set of application−specific class−maps and policy−maps,
which are then applied to existing inspection class−maps and policy−maps by defining the application service
policy in the inspection policy−map.
Application inspection can be applied on HTTP traffic to control unwanted use of HTTPs service port for
other applications such as IM, P2P file sharing, and tunneling applications that can redirect otherwise
firewalled applications through TCP 80.
Configure an application inspection class−map to describe traffic that violates allowed HTTP traffic:
Cisco IOS Software Release 12.4(9)T introduces improvements to ZFWs HTTP inspection capabilities.
Cisco IOS Firewall introduced HTTP Application Inspection in Cisco IOS Software Release 12.3(14)T. Cisco
IOS Software Release 12.4(9)T augments existing capabilities by adding:
• Ability to permit, deny, and monitor requests and responses based on header name and header values.
This is useful to block requests and responses that carry vulnerable header fields.
• Ability to limit the sizes of different elements in the HTTP request and response headers such as
maximum URL length, maximum header length, maximum number of headers, maximum
header−line length, etc. This is useful to prevent buffer overflows.
• Ability to block requests and responses that carry multiple headers of the same type; for instance, a
request with two content−length headers.
• Ability to block requests and responses with non−ASCII headers. This is useful to prevent various
attacks that use binary and other non−ASCII characters to deliver worms and other malicious contents
to web servers.
• Ability to group HTTP methods into user−specified categories and flexibility to block/allow/monitor
each of the group is offered. The HTTP RFC allows a restricted set of HTTP methods. Some of the
standard methods are considered unsafe because they can be used to exploit vulnerabilities on a web
server. Many of the non−standard methods have a bad security record.
• Method to block specific URIs based on a user configured regular expression. This feature gives a
user the capability to block custom URIs and queries.
• Ability to spoof header types (especially server header type) with user customizable strings. This is
useful in a case where an attacker analyzes web server responses and learns as much information as
possible, then launches an attack that exploits weaknesses in that particular web server.
• Ability to block or issue an alert on an HTTP connection if one or more HTTP parameter values
match values entered by the user as a regular expression. Some of the possible HTTP value contexts
include header, body, username, password, user agent, request line, status line, and decoded CGI
variables.
Configuration examples for HTTP application inspection improvements assume a simple network:
• HTTP traffic
• All other single−channel TCP, UDP, and ICMP traffic
HTTP is separated to allow specific inspection on web traffic. This allows you to configure policing in the
first section of this document, and HTTP Application Inspection in the second section. You will configure
specific class−maps and policy−maps for P2P and IM traffic in the third section of this document.
Connectivity is allowed from the private zone to the public zone. No connectivity is provided from the public
zone to the private zone.
A complete configuration implementing the initial policy is provided in Appendix C, Basic Zone−Policy
Firewall Configuration For Two Zones.
HTTP Application Inspection (as well as other application inspection policies) requires more complex
configuration than basic Layer 4 configuration. You must configure Layer 7 traffic classification and policy to
recognize specific traffic that you wish to control, and to apply the desired action to desirable and undesirable
traffic.
HTTP Application Inspection (similar to other types of Application Inspection) can only be applied to HTTP
traffic. Thus, you must define Layer 7 class−maps and policy−maps for specific HTTP traffic, then define a
Layer−4 class−map specifically for HTTP, and apply the Layer−7 policy to HTTP inspection in a Layer−4
policy−map, as such:
All of these HTTP Application Inspection traffic characteristics are defined in a Layer 7 class−map:
APPFW−6−HTTP_HDR_REGEX_MATCHED
Command usage:
Configure an http appfw policy to block request or response whose header contains non−ASCII
characters.
APPFW−4− HTTP_HEADER_LENGTH
Command usage:
Configure an http appfw policy to block requests and responses having header length greater than
4096 bytes.
APPFW−6− HTTP_HEADER_COUNT.
Command usage:
Configure an http appfw policy to block a request that has more than 16 header fields.
APPFW−6− HTTP_HDR_FIELD_REGEX_MATCHED
Command usage:
APPFW−6− HTTP_HDR_FIELD_LENGTH.
Command usage:
Configure an http appfw policy to block a request whose cookie and user−agent field length exceeds
256 and 128 respectively.
APPFW−6− HTTP_REPEATED_HDR_FIELDS.
Command usage:
Configure an http appfw policy to block a request or response that has multiple content−length header
lines. This is one of the most useful functionalities used to prevent session smuggling.
APPFW−6−HTTP_METHOD.
Command usage:
Configure an http appfw policy that groups the HTTP methods into three categories: safe, unsafe and
webdav. These are shown in the table. Configure actions such that:
♦ all safe methods are allowed without log
♦ all unsafe methods are allowed with log
♦ all webdav methods are blocked with log.
Safe
Unsafe WebDAV
GET, HEAD,
BCOPY,
OPTION POST, PUT,
BDELETE,
CONNECT, TRACE
BMOVE
http policy:
APPFW−6− HTTP_URI_REGEX_MATCHED
Command usage:
Configure an http appfw policy to block a request whose URI matches any of these regular
expressions:
♦ .*cmd.exe
♦ .*sex
♦ .*gambling
parameter−map type regex uri_regex_cm
pattern .*cmd.exe
pattern .*sex
pattern .*gambling
APPFW−6− HTTP_URI_LENGTH.
Command usage:
Configure an http appfw policy to raise an alarm whenever URI length of a request exceeds 3076
bytes.
APPFW−6− HTTP_ARG_REGEX_MATCHED
Command usage:
Configure an http appfw policy to block a request whose arguments match any of these regular
expressions:
♦ .*codered
♦ .*attack
parameter−map type regex arg_regex_cm
pattern .*codered
pattern .*attack
APPFW−6− HTTP_ARG_LENGTH.
Command usage:
Configure an http appfw policy to raise an alarm whenever argument length of a request exceeds 512
bytes.
APPFW−6− HTTP_BODY_REGEX_MATCHED
Command usage:
Configure an http appfw to block a response whose body contains the pattern
.*[Aa][Tt][Tt][Aa][Cc][Kk]
APPFW−4− HTTP_CONTENT_LENGTH
Command usage:
Configure an http appfw policy to block an http session that carries more then 10K bytes message in a
request or response.
APPFW−6−HTTP_STLINE_REGEX_MATCHED.
Command usage:
Configure an http appfw to log an alarm whenever an attempt is made to access a forbidden page. A
forbidden page usually contains a 403 status−code and the status line looks like HTTP/1.0 403
page forbidden\r\n.
APPFW−4− HTTP_CONT_TYPE_VIOLATION,
APPFW−4− HTTP_CONT_TYPE_MISMATCH,
APPFW−4− HTTP_CONT_TYPE_UNKNOWN
Command usage:
Configure an http appfw policy to block an http session that carries requests and responses having
unknown content−type.
APPFW−4− HTTP_PORT_MISUSE_TYPE_IM
APPFW−4−HTTP_PORT_MISUSE_TYPE_P2P
APPFW−4−HTTP_PORT_MISUSE_TYPE_TUNNEL
Command usage:
Configure an http appfw policy to block an http session being misused for IM application.
APPFW−4− HTTP_PROTOCOL_VIOLATION
Command usage:
Configure an http appfw policy to block requests or responses violating RFC 2616:
APPFW−6− HTTP_TRANSFER_ENCODING
Command usage:
Configure an http appfw policy to block a request or response that has compress type encoding.
APPFW−4− HTTP_JAVA_APPLET
Command usage:
Cisco IOS Software Release 12.4(9)T introduced ZFW support for IM and P2P Applications.
Cisco IOS Software first offered support for IM application control in Cisco IOS Software Release 12.4(4)T.
The initial release of ZFW did not support IM Application in the ZFW interface. If IM application control was
desired, users were unable to migrate to the ZFW configuration interface. Cisco IOS Software Release
12.4(9)T introduces ZFW support for IM Inspection, supporting Yahoo! Messenger (YM), MSN Messenger
(MSN), and AOL Instant Messenger (AIM).
Cisco IOS Software Release 12.4(9)T is the first version of Cisco IOS Software that offers native IOS
Firewall support for P2P file sharing applications.
Both IM and P2P inspection offer Layer 4 and Layer 7 policies for application traffic. This means ZFW can
provide basic stateful inspection to permit permit or deny the traffic, as well as granular Layer 7 control on
specific activities in the various protocols, so that certain application activities are allowed while others are
denied.
SDM 2.2 introduced P2P Application control in its Firewall configuration section. SDM applied a
Network−Based Application Recognition (NBAR) and QoS policy to detect and police P2P application
activity to a line rate of zero, blocking all P2P traffic. This raised the issue that CLI users, expecting P2P
support in the IOS Firewall CLI, were unable to configure P2P blocking in the CLI unless they were aware of
the necessary NBAR/QoS configuration. Cisco IOS Software Release 12.4(9)T introduces native P2P control
in the ZFW CLI, leveraging NBAR to detect P2P application activity. This software release supports several
P2P application protocols:
• BitTorrent
• eDonkey
• FastTrack
• Gnutella
• KaZaA / KaZaA2
• WinMX
P2P applications are particularly difficult to detect, as a result of port−hopping behavior and other tricks to
avoid detection, as well as problems introduced by frequent changes and updates to P2P applications which
modify the protocols behaviors. ZFW combines native firewall stateful inspection with NBARs
traffic−recognition capabilities to deliver P2P application control in ZFWs CPL configuration interface.
NBAR offers two excellent benefits:
As mentioned earlier, P2P inspection and control offers both Layer 4 Stateful Inspection and Layer 7
Application Control.
Layer 4 inspection is configured similarly to other application services, if inspection of the native application
service ports will be adequate:
Notice the additional signature option in the match protocol [service−name]. By adding the signature option at
the end of the match protocol statement, NBAR heuristics are applied to the traffic to search for telltales in
traffic that indicate specific P2P application activity. This includes port−hopping and other changes in
application behavior to avoid traffic detection. This level of traffic inspection comes at the price of increased
CPU utilization and reduced network throughput capability. If the signature option is not applied,
NBAR−based heuristic analysis will not be applied to detect port−hopping behavior, and CPU utilization will
not be impacted to the same extent.
Native service inspection carries the disadvantage that it is unable to maintain control over P2P applications in
the event that the application hops to a non−standard source and destination port, or if the application is
updated to begin its action on an unrecognized port number:
UDP 6346−6348
kazaa2
Dependent on PAM
winmx
TCP 6699
If you wish to allow (inspect) P2P traffic, you might need to provide additional configuration. Some
applications might use multiple P2P networks, or implement specific behaviors that you might need to
accommodate in your firewall configuration to allow the application to work:
• BitTorrent clients usually communicate with trackers (peer directory servers) via http running on
some non−standard port. This is typically TCP 6969, but you might need to check the torrent−specific
tracker port. If you wish to allow BitTorrent, the best method to accomodate the additional port is to
configure HTTP as one of the match protocols and add TCP 6969 to HTTP using the ip port−map
command:
You will need to define http and bittorrent as the match criteria applied in the class−map.
• eDonkey appears to initiate connections that are detected as both eDonkey and Gnutella.
• KaZaA inspection is entirely dependent on NBAR−signature detection.
Layer 7 (Application) Inspection augments Layer 4 Inspection with the capability to recognize and apply
service−specific actions, such as selectively blocking or allowing file−search, file−transfer, and text−chat
capabilities. Service−specific capabilities vary by service.
P2P Application Inspection offers application−specific capabilities for a subset of the applications supported
by Layer 4 Inspection:
• edonkey
• fasttrack
• gnutella
• kazaa2
edonkey
fasttrack
gnutella
kazaa2
New P2P protocol definitions or updates to existing P2P protocols can be loaded using the dynamic pdlm
update functionality of NBAR. This is the configuration command to load the new PDLM:
The new protocol is available in match protocol ... commands for class type inspect. If the new P2P protocol
has services (sub−protocols), the new Layer 7 inspect class−map types, as well as Layer 7 match criteria,
become available.
Cisco IOS Software Release 12.4(4)T introduced IM Application Inspection and Control. IM support was not
introduced with ZFW in 12.4(6)T, so users were unable to apply IM control and ZFW in the same firewall
policy, as ZFW and legacy firewall features cannot co−exist on a given interface.
Cisco IOS Software Release 12.4(9)T supports stateful inspection and application control for these IM
services:
IM inspection varies slightly from most services, as IM inspection relies on controlling access to a specific
group of hosts for each given service. IM services generally rely on a relatively permanent group of directory
servers, which clients must be able to contact in order to access the IM service. IM applications tend to be
very difficult to control from a protocol or service standpoint. The most effective way to control these
applications is to limit access to the fixed IM servers.
Configuring IM Inspection
IM inspection and control offers both Layer 4 Stateful Inspection and Layer 7 Application Control.
IM applications are able to contact their servers on multiple ports to maintain their functionality. If you wish
to allow a given IM service by applying the inspect action, you might not need a server−list to define
permitted access to the IM services servers. However, configuring a class−map that specifies a given IM
service, such as AOL Instant Messenger, and applying the drop action in the associated policy−map can cause
the IM client to try and locate a different port where connectivity is allowed to the Internet. If you do not want
to allow connectivity to a given service, or if you want to restrict IM service capability to text−chat, you must
define a server list so the ZFW can identify traffic associated with the IM application:
You must configure the ip domain lookup and ip name−server ip.ad.re.ss commands in order to enable
name resolution.
IM server names are fairly dynamic. You will need to periodically check that your configured IM server lists
are complete and correct.
Layer 7 (Application) Inspection augments Layer 4 Inspection with the capability to recognize and apply
service−specific actions, such as selectively blocking or allowing text−chat capabilities, while denying other
service capabilities.
IM Application Inspection presently offers the capability to differentiate between text−chat activity and all
other application services. In order to restrict IM activity to text−chat, configure a Layer 7 policy:
Apply the Layer 7 policy to the Yahoo! Messenger policy configured earlier:
URL Filtering
ZFW offers URL filtering capabilities to limit access to web content to that specified by a white− or black−list
defined on the router, or by forwarding domain names to a URL filtering server to verify access to specific
domains. ZFW URL filtering in Cisco IOS Software Releases 12.4(6)T to 12.4(15)T is applied as an
additional policy action, similar to application inspection.
For server−based URL filtering, you must define a parameter−map that describes the urlfilter server
configuration:
If static white− or black−lists are preferred, you can define a list of domains or subdomains that are
specifically allowed or denied, while the inverse action is applied to traffic that does not match the list:
If a URL black−list is defined using deny options in the exclusive−domain definitions, all other domains will
be allowed. If any permit definitions are defined, all domains that will be allowed must be explicitly
specified, similar to the function of IP access−control lists.
Define a policy−map that associates your class−map with inspect and urlfilter actions:
This configures the minimum requirement to communicate with a URL filtering server. Several options are
available to define additional URL filtering behavior.
Some network deployments might want to apply URL filtering for some hosts or subnets, while bypassing
URL filtering for other hosts. For instance, in Figure 9, all the hosts in the private zone must have HTTP
traffic checked by a URL filter server, except for the specific host 192.168.1.101.
• One class−map that only matches HTTP traffic for the larger group of hosts, which will receive URL
filtering.
• One class−map for the smaller group of hosts, which will not receive URL filtering. The second
class−map will match HTTP traffic, as well as a list of hosts that will be exempted from the URL
filtering policy.
Both class−maps are configured in a policy−map, but only one will receive the urlfilter action:
Generally, the NFP feature family is best suited for control of traffic destined for the router itself. Refer to
Control Plane Security Overview in Cisco IOS Software for information that describes router protection using
the NFP features.
If you decide to apply ZFW to control traffic to and from the IP addresses on the router itself, you must
understand that the firewalls default policy and capabilities differ from those available for transit traffic.
Transit traffic is defined as network traffic whose source and destination IP addresses do not match any IP
addresses applied to any of the routers interfaces, and the traffic will not cause the router to send, for
example, network control messages such as ICMP TTL expiration or network/host unreachable messages.
ZFW applies a default deny−all policy to traffic moving between zones, except, as mentioned in the general
rules, traffic in any zone flowing directly to the addresses of the routers interfaces is implicitly allowed. This
assures that connectivity to the routers management interfaces is maintained when a zone firewall
configuration is applied to the router. If the same deny−all policy affected connectivity directly to the router, a
complete management policy configuration would have to be applied before zones are configured on the
router. This would likely disrupt management connectivity if the policy were improperly implemented or
applied in the wrong order.
When an interface is configured to be a zone member, the hosts connected to the interface are included in the
zone. However, traffic flowing to and from the IP addresses of the routers interfaces is not controlled by the
zone policies (with the exception of circumstances described in the note following Figure 10). Instead, all of
the IP interfaces on the router are automatically made part of the self zone when ZFW is configured. In order
to control IP traffic moving to the routers interfaces from the various zones on a router, policies must be
applied to block or allow/inspect traffic between the zone and the routers self zone, and vice versa. (See
Figure 10.)
Figure 10: Apply policy between network zones and routers self zone
Although the router offers a default−allow policy between all zones and the self zone, if a policy is configured
from any zone to the self zone, and no policy is configured from self to the routers user−configurable
interface−connected zones, all router−originated traffic encounters the connected−zone to self−zone policy on
its return the router and is blocked. Thus, router−originated traffic must be inspected to allow its return to the
self zone.
Note: Cisco IOS Software always uses the IP address associated with an interface nearest destination hosts
for traffic such as syslog, tftp, telnet, and other control−plane services, and subjects this traffic to self−zone
firewall policy. However, if a service defines a specific interface as the source−interface using commands that
include, but not limited to logging source−interface [type number], ip tftp source−interface [type
number], and ip telnet source−interface [type number], the traffic is subjected to the zone−to−zone
firewall policy for the source interfaces zone and the security zone of the destination host. If a service is
configured to use an interface that is assigned to a specific security zone, self−zone policy does not apply to
that services traffic.
Note: Some services (particularly routers voice−over−IP services) use ephemeral or non−configurable
interfaces that cannot be assigned to security zones. These services might not function properly if their traffic
cannot be associated with a configured security zone. If the service is configured to use one of the
configurable physical or virtual interfaces on the device, the traffic should be handled by security zone policy
relevant to that interface.
Self−zone policy has limited functionality as compared to the policies available for transit−traffic zone−pairs:
• As was the case with classical stateful inspection, router−generated traffic is limited to TCP, UDP,
ICMP, and complex−protocol inspection for H.323.
• Application Inspection is not available for self−zone policies.
• Session and rate limiting cannot be configured on self−zone policies.
Under most circumstances, these are desirable access policies for router management services:
• Deny all Telnet connectivity, as Telnets clear−text protocol easily exposes user credentials and other
sensitive information.
• Allow SSH connections from any user in any zone. SSH encrypts user credentials and session data,
which provides protection from malicious users that employ packet−capturing tools to snoop on user
activity and compromise user credentials or sensitive information such as router configuration. SSH
Version 2 provides stronger protection, and addresses specific vulnerabilities inherent to SSH Version
1.
• Allow HTTP connectivity to the router from the private zones, if the private zone is trustworthy.
Otherwise, if the private zone harbors the potential for malicious users to compromise information,
HTTP does not employ encryption to protect management traffic, and might reveal sensitive
information such as user credentials or configuration.
• Allow HTTPS connectivity from any zone. Similar to SSH, HTTPS encrypts session data and user
credentials.
• Restrict SNMP access to a specific host or subnet. SNMP can be used to modify router configuration
and reveal configuration information. SNMP should be configured with access control on the various
communities.
• Block ICMP requests from the public Internet to the private−zone address (assuming the private−zone
address is routable). One or more public addresses may be exposed for ICMP traffic for network
troubleshooting, if necessary. Several ICMP attacks can be used to overwhelm router resources or
reconnoiter network topology and architecture.
A router can apply this type of policy with the addition of two zone−pairs for each zone that must be
controlled. Each zone−pair for traffic inbound to, or outbound from, the router self−zone must be matched by
the respective policy in the opposite direction, unless traffic will not be originated in the opposite direction.
One policy−map each for inbound and outbound zone−pairs can be applied that describes all of the traffic, or
specific policy−maps per zone−pair can be applied. Configuration of specific zone−pairs per policy−map
provides granularity for viewing activity matching each policy−map.
Assuming an example network with an SNMP management station at 172.17.100.11, and a TFTP server at
172.17.100.17, this output provides an example of the entire management−interface access policy:
!
interface FastEthernet 0/0
ip address 172.16.100.10
zone−member security internet
!
interface FastEthernet 0/1
ip address 172.17.100.10
zone−member security private
!
access−list 120 permit icmp 172.17.100.0 0.0.0.255 any
access−list 120 permit icmp any host 172.17.100.10 echo
access−list 120 deny icmp any any
access−list 120 permit tcp 172.17.100.0 0.0.0.255 host 172.17.100.10 eq www
access−list 120 permit tcp any any eq 443
access−list 120 permit tcp any any eq 22
access−list 120 permit udp any host 172.17.100.10 eq snmp
access−list 121 permit udp host 172.17.100.17 host 172.17.100.10
access−list 122 permit udp host 172.17.100.10 host 172.17.100.17
Unfortunately, the self−zone policy does not offer the capability to inspect TFTP transfers. Thus, the firewall
must pass all traffic to and from the TFTP server if TFTP must pass through the firewall.
If the router will terminate IPSec VPN connections, you should also define a policy to pass IPSec ESP, IPSec
AH, ISAKMP, and NAT−T IPSec (UDP 4500). This depends on which is needed based on services you will
use. The following policy can be applied in addition to the policy above. Note the change to the policy−maps
where a class−map for VPN traffic has been inserted with a pass action. Typically, encrypted traffic is
trustworthy, unless your security policy states that you must allow encrypted traffic to and from specified
endpoints.
When the zone name is not included, the command displays the information of all the zones configured.
Display the source zone, destination zone and policy attached to the zone−pair:
When no source or destination is specified, all the zone−pairs with source, destination, and the associated
policy are displayed. When only the source/destination zone is mentioned, all the zone−pairs that contain this
zone as the source/destination are displayed.
When the name of a policy−map is not specified, it displays all policy−maps of type inspect (including Layer
7 policy−maps that contain a subtype).
Displays the runtime inspect type policy−map statistics existing on a specified zone−pair.
The sessions option displays the inspection sessions created by the policy−map application on the specified
zone−pair.
Service−policy : p1
Class−map: c1 (match−all)
Match: protocol tcp
Inspect
Session creations since subsystem startup or last reset 0
Current session counts (estab/half−open/terminating) [0:0:0]
Maxever session counts (estab/half−open/terminating) [0:0:0]
Last session created never
Last statistic reset never
Last session creation rate 0
Last half−open session total 0
Class−map: c2 (match−all)
Match: protocol udp
Pass
0 packets, 0 bytes
The urlfilter keyword displays the urlfilter−related statistics that pertain to the policy−map specified (or
policy−maps on all targets when no zone−pair name is specified):
When the cache keyword is specified along with urlfilter, it displays the urlfilter cache (of IP addresses).
show policy−map type inspect inspect { <policy name> [class <class name>] |
zone−pair [<zone−pair name>] [sessions | urlfilter cache] }
Tuning Zone−Based Policy Firewall Denial−of−Service
Protection
ZFW offers DoS protection to alert network engineers to dramatic changes in network activity, and to mitigate
unwanted activity to reduce the impact of network activity changes. ZFW maintains a separate counter for
every policy−maps class−map. Thus, if one class−map is used for two different zone−pairs policy−maps,
two different sets of DoS protection counters will be applied.
ZFW provides DoS attack mitigation as a default on Cisco IOS Software releases before 12.4(11)T. The
default DoS protection behavior changed with Cisco IOS Software Release 12.4(11)T. Refer to Tuning Cisco
IOS Firewall Denial−of−Service Protection for further discussion and a procedure to adjust ZFW DoS
protection.
Refer to Defining Strategies to Protect Against TCP SYN Denial of Service Attacks for more information
about TCP SYN DoS attacks.
Appendix
Appendix A: Basic Configuration
ip subnet−zero
ip cef
!
bridge irb
!
interface FastEthernet0
ip address 172.16.1.88 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2
switchport access vlan 2
!
interface FastEthernet3
switchport access vlan 2
!
interface FastEthernet4
switchport access vlan 1
!
interface FastEthernet5
switchport access vlan 1
!
interface FastEthernet6
switchport access vlan 1
!
interface FastEthernet7
switchport access vlan 1
!
interface Vlan1
no ip address
bridge−group 1
!
interface Vlan2
no ip address
bridge−group 1
!
interface BVI1
ip address 192.168.1.254 255.255.255.0
ip route−cache flow
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.1.1
!
bridge 1 protocol ieee
bridge 1 route ip
!
end
Related Information
• Technical Support & Documentation − Cisco Systems