Task 9: Configure ZPF on R3
http://wenku.baidu.com/link?url=MzxNcQiVx3IqYVEt_odsanWTIMidC1NV-sNvQv1QauDCwrGZPeg_mQK2mvniJ_bz66Kgr8fq7941OoDnrxBGWV-lnHleTkqdPUfm7oA-f1eStep 1. Test connectivity.
Verify that the internal host can accessexternal resources.
From PC-C, test connectivity with ping andTelnet to R2; all should be successful.
From R2 ping toPC-C. The pings should be allowed.
Step 2. Create the firewall zones.
Create an internal zone named IN-ZONE.
Create an external zone named OUT-ZONE.
zone securityIN-ZONE
exit
zone securityOUT-ZONE
exit
Step 3. Create an ACL that defines internal traffic.
Create an extended, numbered ACL thatpermits all IP protocols from the 192.168.3.0/24 source network to any destination.Use 101 for the ACL number.
access-list101 permit ip 192.168.3.0 0.0.0.255 any
R3(config)#ipaccess-list extended 101
R3(config-ext-nacl)#10permit ip 192.168.3.0 0.0.0.255 any
R3(config-ext-nacl)#exit
Step 4. Create a class map referencing the internal traffic ACL.
Create a class map named IN-NET-CLASS-MAP to match ACL 101.
Step 5. Specify firewall policies.
Create a policy map named IN-2-OUT-PMAP to determine what to do with matchedtraffic.
Specify a class type of inspect andreferenceclass map IN-NET-CLASS-MAP.
Specify the action of inspect forthis policy map
Step4\5要注意在配置class-map的时候就要直接type in
这样在创建type i8n的policymap之下才能映射到双in的模式
class-maptype inspect match-all IN-NET-CLASS-MAP
match access-group 101
!
policy-maptype inspect IN-2-OUT-PMAP
class type inspect IN-NET-CLASS-MAP
inspect
Step 6. Apply firewall policies.
Create a zone pair named IN-2-OUT-ZPAIR. Specify the source and destination zonesthat were created earlier.
Attach a policy map and actions to thezone pair referencing the policy map previously created, IN-2-OUT-PMAP.
Exit to the global config prompt andassign the internal and external interfaces to the security zones.
zone securityIN-ZONE
zone security OUT-ZONE
zone-pair securityIN-2-OUT-ZPAIR source IN-ZONE destination OUT-ZONE
service-policy type inspect IN-2-OUT-PMAP
interfaceFastEthernet0/1
ip address 192.168.3.1 255.255.255.0
zone-member security IN-ZONE
!
interfaceSerial0/0/1
ip address 10.2.2.1 255.255.255.252
zone-member security OUT-ZONE
Step 7. Test firewall functionality.
Verify that the internal host can stillaccess external resources.
From PC-C, test connectivity with ping andTelnet to R2; all should be successful.
From R2 ping toPC-C. The pings should now be blocked.
在R3上配置ZBF防火墙,具体参数见上。