10-20-2012 02:37 AM - edited 03-08-2019 06:46 PM
Even though ASA devices are considered as the dedicated firewall device, Cisco integrated the firewall functionality in the router which in fact will make the firewall a cost effective device. The Zone Based firewall replaces the CBAC by introducing many features in its firewall functionality. The ZBF mainly deals with the security zones, where we can put the interfaces into various security zones and control the traffic between the zones.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Comparison chart of ZBF & CBAC
CBAC
Zone Based Firewall
Controls inbound & outbound access on an interface
Controls Bidirectional access between zones.
Uses inspect statements and stateful ACLs
Uses C3PL Configuration language
Support from IOS Release 11.2
Support from IOS Release 12.4(6)
When you first look at the ZBF configuration you would think it is complex and difficult. But once you understand the actual concept behind the configuration everything seems to be easy for you. Here I am going to divide the full configuration into different logical sets and finally combine all those sets to get the full configuration.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
ZBF Configuration Tasks
<P style="TEXT-ALIGN: left" mcestyle="text-align: left;">
We can configure a Zone Based Firewall by accomplishing the below tasks:
Configure zones.
Assign Router Interfaces to zones
Create zone pairs
Configure Interzone Access Policy
<DIV style="MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="margin-bottom: 0in; font-weight: normal; text-decoration: none;">Which Include:
Class Maps
Policy Maps
5. Apply policy maps to zone pairs
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Network Diagram
<P style="TEXT-ALIGN: left" mcestyle="text-align: left;">I am using the below diagram as a reference to configure Zone Based Firewall :
<IMG class="jive-image-thumbnail jive-image" alt="zbf_ntwrk_dgm (2).jpg" src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108592/zbf_ntwrk_dgm%282%29.jpg" width=620 mcesrc="/servlet/JiveServlet/downloadImage/108592/zbf_ntwrk_dgm%282%29.jpg" __jive_id="108592" __jive_ID="108592">
Here I am defining three zones i.e Inside zone, Outside zone and DMZ zone.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Below is the rule set for our ZBF:
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
1. From Inside to Outside -http, tcp, udp, icmp and pop3 is allowed
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
2. From Outside to Inside -icmp is allowed
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
3. From Inside to DMZ -http, tcp and icmp is allowed
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
4. From Outside to DMZ -only HTTP is allowed.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Before going to the configuration you have to understand the default rule of communication between the zones:
Interzone (Between two zones) communication – Denied by default
Intrazone communication (Inside a zone) – Allowed by default
Task 1: Configure zones
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
We have to configure three zones. Inside , Outside , DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
INSIDE Zone - This is the zone where my LAN is located
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
OUTSIDE Zone – This is the zone where the router is connected to the Internet
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
DMZ Zone – Company's DMZ zone.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Connect the router via console or putty and switch to the global configuration mode and type the command as below :
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Router(config)#zone security INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone security OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone security DMZ
<IMG class="jive-image-thumbnail jive-image" alt=zbf1.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108602/zbf1.JPG" width=620 mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108602/zbf1.JPG" __jive_id="108602" __jive_ID="108602">
Now we got three zones in our firewall.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Task 2 :Assign Router Interfaces to zones
Now we have to assign the router's interface to a particular zone.Here I am going to assign Gigabyte Ethernet 0/0 (LAN interface) to INDISE zone , Ge0/1 to OUTSIDE zone and Ge0/2 to DMZ zone.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
For this we have to go to the particular interface and attach the interface to the zone.Type the command below to achieve this:
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#zone-member security INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#zone-member security OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#interface gigabitEthernet 0/2
Router(config-if)#zone-member security DMZ
<IMG class=jive-image alt=zbf2.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108603/zbf2.JPG" mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108603/zbf2.JPG" __jive_id="108603" __jive_ID="108603">
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Task 3: Create zone pairs
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Zone pairs are created to connect the zones. If you want to make two zones to communicate you have to create zone pairs.
DO NOT create zone pairs for non-communicating zones.
Here the communication is happening between:
INSIDE to OUTSIDE
OUTSIDE to INSIDE
OUTSIDE to DMZ
INSIDE to DMZ
So we need to create four zone pairs. The command is as follows:
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security IN-TO-OUT source INSIDE destination OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security OUT-TO-IN source OUTSIDE destination INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security OUT-TO-DMZ source OUTSIDE destination DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security IN-TO-DMZ source INSIDE destination DMZ
Router(config)#exit
<IMG class="jive-image-thumbnail jive-image" alt=zbf3.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108604/zbf3.JPG" width=634 height=86 mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108604/zbf3.JPG" __jive_id="108604" __jive_ID="108604">
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Task 4: Configure Interzone Access Policy
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
The interzone access policy is the key part of the zone based firewall where we configure layer 3 & layer 4 access policies.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
In this step we will create Class Maps and Policy Maps.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Class Map Configuration
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Class map will group the traffic into different categories. In our situation we have to create class maps for all the traffic between the zones.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Here I am going to create the ACL and associate it with the class maps. The ACL will decide the interesting traffic.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Class Map for INSIDE-TO-OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#ip access-list extended INSIDE-TO-OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp 172.17.0.0 0.0.255.255 any eq www
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp 172.17.0.0 0.0.255.255 any eq echo
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp 172.17.0.0 0.0.255.255 any eq pop3
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#class-map type inspect match-all INSIDE-TO-OUTSIDE-CLASS
Router(config-cmap)#match access-group name INSIDE-TO-OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Class Map for OUTSIDE-TO-INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#ip access-list extended OUTSIDE-TO-INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp any 172.17.0.0 0.0.255.255 eq echo
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config)#class-map type inspect match-all OUTSIDE-TO-INSIDE--CLASS</STRONG></SPAN></P></DIV> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config-cmap)#match access-group name OUTSIDE-TO-INSIDE</STRONG></SPAN></P></DIV> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Class Map for OUTSIDE-TO-DMZ
Router(config)#ip access-list extended OUTSIDE-TO-DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp any 192.168.1.0 0.0.0.255 eq www
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config)#class-map type inspect match-all OUTSIDE-TO-DMZ--CLASS</STRONG></SPAN></P> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config-cmap)#match access-group name OUTSIDE-TO-DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Class Map for INSIDE-TO-DMZ</STRONG></SPAN></P> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#ip access-list extended INSIDE-TO-DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-ext-nacl)#permit tcp 172.17.0.0 0.0.255.255 192.168.1.0 0.0.0.255 eq www
Router(config-ext-nacl)#permit tcp 172.17.0.0 0.0.255.255 192.168.1.0 0.0.0.255 eq echo
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config)#class-map type inspect match-all INSIDE-TO-DMZ--CLASS
<STRONG style="COLOR: #000000" mcestyle="color: #000000;">Router(config-cmap)#match access-group name INSIDE-TO-DMZ
<STRONG style="COLOR: #000000" mcestyle="color: #000000;"><STRONG style="COLOR: #000000" mcestyle="color: #000000;"><IMG class=jive-image alt=zbf4.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108605/zbf4.JPG" mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108605/zbf4.JPG" __jive_id="108605" __jive_ID="108605">
<STRONG style="COLOR: #000000" mcestyle="color: #000000;"><STRONG style="COLOR: #000000" mcestyle="color: #000000;"><STRONG style="COLOR: #000000" mcestyle="color: #000000;"><STRONG style="COLOR: #000000" mcestyle="color: #000000;"><IMG class="jive-image-thumbnail jive-image" alt=zbf5.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108606/zbf5.JPG" width=620 mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108606/zbf5.JPG" __jive_id="108606" __jive_ID="108606"></STRONG></STRONG></STRONG></STRONG></STRONG></SPAN></P> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Policy Map Configuration
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Now we are going to define the firewall rules for the above mentioned class maps. We can apply three rules to the traffic which is classified in class maps. i.e 1.)Inspect 2.)Drop 3.)Pass
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Inspect : This will inspect the traffic in a bidirectional manner
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Drop : This will drop the packets
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Pass : This will simply pass the packet.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
During the Policy Map configuration we have to attach the corresponding class-map with the policy-map and create a rule for the particular traffic (Inspect,Drop or Pass)
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
There will be a drop policy, by default ,at the end of all policy maps.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Policy Map for INSIDE-TO-OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#policy-map type inspect INSIDE-TO-OUTSIDE-POLICY
Router(config-pmap)#class type inspect INSIDE-TO-OUTSIDE-CLASS
Router(config-pmap-c)#inspect
Router(config-pmap)#class class-default
Router(config-pmap-c)#drop log
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Policy Map for OUTSIDE-TO-INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#policy-map type inspect OUTSIDE-TO-INSIDE-POLICY
Router(config-pmap)#class type inspect OUTSIDE-TO-INSIDE-CLASS
Router(config-pmap-c)#pass
Router(config-pmap)#class class-default
Router(config-pmap-c)#drop log
Policy Map for OUTSIDE-TO-DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#policy-map type inspect OUTSIDE-TO-DMZ-POLICY
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-pmap)#class type inspect OUTSIDE-TO-DMZ-CLASS
Router(config-pmap-c)#inspect
Router(config-pmap)#class class-default
Router(config-pmap-c)#drop log
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Policy Map for INSIDE-TO-DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#policy-map type inspect INSIDE-TO-DMZ-POLICY
Router(config-pmap)#class type inspect INSIDE-TO-DMZ-CLASS
Router(config-pmap-c)#pass
Router(config-pmap)#class class-default
Router(config-pmap-c)#drop log
<IMG class="jive-image-thumbnail jive-image" alt=zbf6.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108607/zbf6.JPG" width=620 mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108607/zbf6.JPG" __jive_id="108607" __jive_ID="108607"></STRONG></SPAN></P> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in" align=left mcestyle="font-style: normal; margin-bottom: 0in;">
Task 5: Apply policy maps to zone pairs
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Now we have to attach the policy maps to the zone pairs that we have already created using the service-policy command.
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
The command is as follows:
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security IN-TO-OUT source INSIDE destination OUTSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-sec-zone-pair)#service-policy type inspect INSIDE-TO-OUTSIDE-POLICY
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security OUT-TO-IN source OUTSIDE destination INSIDE
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-sec-zone-pair)#service-policy type inspect OUTSIDE-TO-INSIDE-POLICY
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security OUT-TO-DMZ source OUTSIDE destination DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-sec-zone-pair)#service-policy type inspect OUTSIDE-TO-DMZ-POLICY
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
Router(config)#zone-pair security IN-TO-DMZ source INSIDE destination DMZ
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">Router(config-sec-zone-pair)#service-policy type inspect INSIDE-TO-DMZ-POLICY
<STRONG style="COLOR: #000000" mcestyle="color: #000000;"><IMG class="jive-image-thumbnail jive-image" alt=zbf7.JPG src="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108608/zbf7.JPG" width=620 height=81 mcesrc="https://supportforums.cisco.com/servlet/JiveServlet/downloadImage/108608/zbf7.JPG" __jive_id="108608" __jive_ID="108608"></STRONG></STRONG></STRONG></SPAN></P></DIV></DIV> <DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
This is all about the basic configuration of a Zone-Based Policy Firewall.
<STRONG style="TEXT-DECORATION: underline" mcestyle="text-decoration: underline;">Troubleshooting
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Here I am mentioning some basic verification and troubleshooting commands :
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
# show class-map type inspect
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
#show policy-map type inspect
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;">
#show zone-pair security
<DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; text-decoration: none;"><DIV style="FONT-STYLE: normal; MARGIN-BOTTOM: 0in; FONT-WEIGHT: normal; TEXT-DECORATION: none" align=left mcestyle="font-style: normal; margin-bottom: 0in; font-weight: normal; text-decoration: none;">
Now you can deploy the Zone Based Firewall in your environment and test it.
For more information you can visit the Cisco website : <A href="http://www.cisco.com/en/US/docs/ios-xml/ios/sec_data_zbf/configuration/15-1s/sec-zone-pol-fw.html" rel=nofollow mcehref="http://www.cisco.com/en/US/docs/ios-xml/ios/sec_data_zbf/configuration/15-1s/sec-zone-pol-fw.html">http://www.cisco.com/en/US/docs/ios-xml/ios/sec_data_zbf/configuration/15-1s/sec-zone-pol-fw.html
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: