Zone-Based Policy Firewall
A Zone is a group of interfaces that have similar functions or features. Zones establish the security borders of a network. A zone defines a boundary where traffic is subjected to policy restrictions as it crosses to another region of a network. An inspection policy is applied to traffic moving between the zones. Inter-zone policies offer considerable flexibility, so different inspection policies can be applied to multiple host groups connected to the same router interface.
A self zone is a system-defined zone. It does not have any interfaces as members.
Zone-Based Policy Firewall Actions:
Zone-based policy firewall provides three actions for traffic that traverses from one zone to another-
Rules for applying Zone-based Policy Firewall:
Network topology:
The three main policies are-
Configuration:
Step 1: Define Zones and assign interfaces to zones
A security zone is configured for each region- PRIVATE, PUBLIC and DMZ. All interfaces assigned to the same zone will be protected with a similar level of security.
zone security PRIVATE
zone security PUBLIC
zone security DMZ
!
interface fastethernet 2/0
zone-member security PRIVATE
!
interface fastethernet 2/1
zone-member security DMZ
!
interface serial 1/0
zone-member security PUBLIC
!
Step 2: Define class-maps with allowed traffic within zones
We permit Telnet traffic from PUBLIC zone to DMZ zone. So we create a class-map PUBLIC_TO_DMZ to match Telnet traffic.
class-map PUBLIC_TO_DMZ
class-map type inspect match-all PUBLIC_TO_DMZ
match access-group 102
match protocol telnet
!
access-list 102 permit ip any 10.1.1.0 0.0.0.255
!
We also permit hosts in PRIVATE zone to connect to servers in DMZ zone. So we create another class-map PRIVATE_TO_DMZ to permit all services on DMZ servers.
class-map PRIVATE_TO_DMZ
class-map type inspect match-any PRIVATE_TO_DMZ
match access-group 101
match protocol tcp
match protocol udp
match protocol icmp
!
access-list 101 permit ip 192.168.1.0 0.0.0.255 10.1.1.0 0.0.0.255
!
And lastly, hosts in PRIVATE zone can reach any host in PUBLIC zone. So we create a class-map PRIVATE_TO_PUBLIC matching IP address of hosts in PRIVATE zone allowing all traffic.
class-map PRIVATE_TO_PUBLIC
class-map type inspect match-all PRIVATE_TO_PUBLIC
match access-group 103
!
access-list 103 permit ip 192.168.1.0 0.0.0.255 any
!
Step 3: Configure a policy-map which specifies the action for the class-map
The next action is to configure a policy-map to inspect the traffic we have just defined in the class-maps. First policy-map PRIVATE_DMZ_POLICY defines actions for traffic from PRIVATE zone to DMZ zone and PRIVATE_PUBLIC_POLICY defines action for traffic from PRIVATE and PUBLIC zones,
policy-map PRIVATE_DMZ_POLICY and PRIVATE_PUBLIC_POLICY
policy-map type inspect PRIVATE_DMZ_POLICY
class type inspect PRIVATE_TO_DMZ
inspect
!
policy-map type inspect PRIVATE_PUBLIC_POLICY
class type inspect PRIVATE_TO_PUBLIC
inspect
!
And last policy-map PUBLIC_DMZ_POLICY defines actions for traffic from PUBLIC to DMZ zone.
policy-map PUBLIC_DMZ_POLICY
policy-map type inspect PUBLIC_DMZ_POLICY
class type inspect PUBLIC_TO_DMZ
inspect
!
Step 4: Configure the zone-pair and apply the policy-map
A zone-pair allows to specify a unidirectional firewall policy between security zones. A zone-pair is defined using a zone-pair security global configuration command. The direction of the traffic is specified by specifying a source and destination zones.
The service-policy command ties the policy-maps to zone-pair.
zone-pair and service-policy
zone-pair security PRIVATE_DMZ source PRIVATE destination DMZ
service-policy type inspect PRIVATE_DMZ_POLICY
!
zone-pair security PRIVATE_PUBLIC source PRIVATE destination PUBLIC
service-policy type inspect PRIVATE_PUBLIC_POLICY
!
zone-pair security PUBLIC_DMZ source PUBLIC destination DMZ
service-policy type inspect PUBLIC_DMZ_POLICY
!