实验目的:
在Cisco IOS的路由器中,基于区域的防火墙,策略都是在数据从一个区域发到另外一个区域时才生效,在同一个区域内的数据是不会应用任何策略的。而要配置这些策略,方法像使用MQC来配置QOS一样配置防火墙策略,但是两个的配置方法并不完全一致,因为双方的格式会有一些不同。
本实验的目的是要让inside 可以访问outside和dmz, ouside可以访问dmz,dmz那都不能访问。
实验拓扑:
实验说明:
XP 是同过GNS3桥接到VM中的XP ,server 是同过GNS3桥接到VM中的win 2003,DMZ区域是使用一台7200路由器模拟服务器,开启HTTP,TELNET,
本实验使用的IOS是c7200-adventerprisek9-mz.124-22.T.bin
xp和win 2003的配置这里就不给出了下面是R1和R2的配置:(由于配置命令很长希望能耐心看下去)
R1:
1 : !
2 : upgrade fpd auto 3 : version 12.4 4 : service timestamps debug datetime msec 5 : service timestamps log datetime msec 6 : no service password-encryption 7 : ! 8 : hostname R1 9 : ! 10 : boot-start-marker 11 : boot-end-marker 12 : ! 13 : logging message-counter syslog 14 : ! 15 : no aaa new-model 16 : ip source-route 17 : ip cef 18 : ! 19 : ! 20 : ! 21 : ! 22 : no ip domain lookup 23 : ip domain name lab.local 24 : no ipv6 cef 25 : ! 26 : multilink bundle-name authenticated 27 : parameter-map type inspect inside-to-outside 28 : audit-trail on 29 : max-incomplete low 800 30 : max-incomplete high 1000 31 : one-minute low 400 32 : one-minute high 500 33 : udp idle-time 10 34 : tcp idle-time 1800 35 : tcp max-incomplete host 50 block-time 0 36 : sessions maximum 1000 37 : parameter-map type inspect inside-to-dmz 38 : audit-trail on 39 : max-incomplete low 600 40 : max-incomplete high 800 41 : one-minute low 300 42 : one-minute high 400 43 : udp idle-time 10 44 : tcp idle-time 1800 45 : tcp max-incomplete host 30 block-time 0 46 : sessions maximum 300 47 : parameter-map type inspect outside-to-dmz 48 : audit-trail on 49 : max-incomplete low 100 50 : max-incomplete high 200 51 : one-minute low 50 52 : one-minute high 100 53 : udp idle-time 5 54 : tcp idle-time 900 55 : tcp max-incomplete host 20 block-time 1 56 : sessions maximum 150 57 : ! 58 : ! 59 : voice dsp waitstate 0 60 : ! 61 : ! 62 : ! 63 : ! 64 : ! 65 : ! 66 : ! 67 : ! 68 : ! 69 : ! 70 : ! 71 : ! 72 : ! 73 : memory-size iomem 0 74 : archive 75 : log config 76 : hidekeys 77 : ! 78 : ! 79 : ! 80 : ! 81 : ! 82 : ! 83 : class-map type inspect match-any outside-to-dmz 84 : match protocol smtp 85 : match protocol ftp 86 : match protocol http 87 : match protocol https 88 : class-map type inspect match-any inside-to-outside 89 : match protocol tcp 90 : match protocol udp 91 : match protocol http 92 : match protocol https 93 : match protocol ftp 94 : match protocol smtp 95 : match protocol telnet 96 : class-map type inspect match-any inside-to-dmz 97 : match protocol ftp 98 : match protocol smtp 99 : match protocol http 100 : match protocol https 101 : match protocol telnet 102 : match access-group name outside-to-dmz 103 : ! 104 : ! 105 : policy-map type inspect outside-to-dmz 106 : class type inspect outside-to-dmz 107 : inspect outside-to-dmz 108 : class class-default 109 : drop 110 : policy-map type inspect inside-to-outside 111 : class type inspect inside-to-outside 112 : inspect inside-to-outside 113 : class class-default 114 : drop 115 : policy-map type inspect inside-to-dmz 116 : class type inspect inside-to-dmz 117 : inspect inside-to-dmz 118 : class class-default 119 : drop 120 : ! 121 : zone security inside 122 : zone security outside 123 : zone security dmz 124 : zone-pair security inside-to-dmz source inside destination dmz 125 : service-policy type inspect inside-to-dmz 126 : zone-pair security outside-to-dmz source outside destination dmz 127 : service-policy type inspect outside-to-dmz 128 : zone-pair security inside-to-outside source inside destination outside 129 : service-policy type inspect inside-to-outside 130 : ! 131 : ! 132 : ! 133 : ! 134 : interface FastEthernet0/0 135 : ip address 192.168.80.1 255.255.255.0 136 : zone-member security inside 137 : duplex auto 138 : speed auto 139 : ! 140 : interface FastEthernet0/1 141 : ip address 192.168.20.1 255.255.255.0 142 : zone-member security outside 143 : duplex auto 144 : speed auto 145 : ! 146 : interface FastEthernet1/0 147 : ip address 192.168.12.1 255.255.255.0 148 : zone-member security dmz 149 : duplex auto 150 : speed auto 151 : ! 152 : interface FastEthernet1/1 153 : no ip address 154 : shutdown 155 : duplex auto 156 : speed auto 157 : ! 158 : ip forward-protocol nd 159 : no ip http server 160 : no ip http secure-server 161 : ! 162 : ! 163 : ! 164 : ip access-list extended outside-to-dmz 165 : permit ip any host 192.168.12.2 166 : ! 167 : logging alarm informational 168 : ! 169 : ! 170 : ! 171 : ! 172 : ! 173 : ! 174 : ! 175 : control-plane 176 : ! 177 : ! 178 : ! 179 : mgcp fax t38 ecm 180 : ! 181 : ! 182 : ! 183 : ! 184 : gatekeeper 185 : shutdown 186 : ! 187 : ! 188 : line con 0 189 : exec-timeout 0 0 190 : privilege level 15 191 : logging synchronous 192 : stopbits 1 193 : line aux 0 194 : exec-timeout 0 0 195 : privilege level 15 196 : logging synchronous 197 : stopbits 1 198 : line vty 0 4 199 : login 200 : ! 201 : endR2:
1 : !
2 : upgrade fpd auto 3 : version 12.4 4 : service timestamps debug datetime msec 5 : service timestamps log datetime msec 6 : no service password-encryption 7 : ! 8 : hostname R2 9 : ! 10 : boot-start-marker 11 : boot-end-marker 12 : ! 13 : logging message-counter syslog 14 : ! 15 : no aaa new-model 16 : ip source-route 17 : ip cef 18 : ! 19 : ! 20 : ! 21 : ! 22 : no ip domain lookup 23 : ip domain name lab.local 24 : no ipv6 cef 25 : ! 26 : multilink bundle-name authenticated 27 : ! 28 : ! 29 : voice dsp waitstate 0 30 : ! 31 : ! 32 : ! 33 : ! 34 : ! 35 : ! 36 : ! 37 : ! 38 : ! 39 : ! 40 : ! 41 : ! 42 : ! 43 : memory-size iomem 0 44 : username root privilege 15 password 0 root 45 : archive 46 : log config 47 : hidekeys 48 : ! 49 : ! 50 : ! 51 : ! 52 : ! 53 : ! 54 : ! 55 : ! 56 : ! 57 : interface FastEthernet0/0 58 : no ip address 59 : duplex half 60 : ! 61 : interface FastEthernet1/0 62 : ip address 192.168.12.2 255.255.255.0 63 : duplex auto 64 : speed auto 65 : ! 66 : interface FastEthernet1/1 67 : no ip address 68 : shutdown 69 : duplex auto 70 : speed auto 71 : ! 72 : ip forward-protocol nd 73 : ip route 0.0.0.0 0.0.0.0 192.168.12.1 74 : ip http server 75 : ip http authentication local 76 : no ip http secure-server 77 : ! 78 : ! 79 : ! 80 : logging alarm informational 81 : ! 82 : ! 83 : ! 84 : ! 85 : ! 86 : ! 87 : ! 88 : control-plane 89 : ! 90 : ! 91 : ! 92 : mgcp fax t38 ecm 93 : ! 94 : ! 95 : ! 96 : ! 97 : gatekeeper 98 : shutdown 99 : ! 100 : ! 101 : line con 0 102 : exec-timeout 0 0 103 : privilege level 15 104 : logging synchronous 105 : stopbits 1 106 : line aux 0 107 : exec-timeout 0 0 108 : privilege level 15 109 : logging synchronous 110 : stopbits 1 111 : line vty 0 4 112 : login local 113 : line vty 5 1869 114 : login local 115 : ! 116 : end