拓撲圖
IP地址規划
設備名 |
端口 |
IP地址 |
子網掩碼 |
網關 |
R1 |
S0/1/0 |
10.29.3.2 |
24 |
|
F0/0 |
10.29.1.1 |
24 |
|
|
R2 |
S0/1/0 |
10.29.3.1 |
24 |
|
S0/1/1 |
10.29.4.1 |
24 |
|
|
R3 |
S0/1/0 |
10.29.4.2 |
24 |
|
F0/0 |
10.29.2.1 |
24 |
|
|
PC-A |
F0/0 |
10.29.1.2 |
24 |
10.29.1.1 |
PC-C |
F0/0 |
10.29.2.2 |
24 |
10.29.2.1 |
1 配置端口地址以及賬號配置
路由器預配置如下:
- Ys 密碼: 123
- 動態路由
2查看連通性
pc-a ping pc-c
pc-c telnet R2
http服務
3配置區域策略防火牆
R3(config)# zone security IN-ZONE //創建區域IN-ZONE
R3(config-sec-zone)# exit
R3(config)# zone security OUT-ZONE //創建區域OUT-ZONE
R3(config-sec-zone)# exit
R3(config)# access-list 101 permit ip 10.29.2.0 0.0.0.255 any //用access-list創建擴展ACL101來在IP層面允許所有從……源網絡地址訪問到任何其他地址
R3(config)# class-map type inspect match-all IN-NET-CLASS-MAP
R3(config-cmap)# match access-group 101
R3(config-cmap)# exit //用 class map type inspect (match all)來創建一個叫 class map type inspect 的class map,用match access-group匹配ACL
R3(config)# policy-map type inspect IN-2-OUT-PMAP //創建策略圖IN-2-OUT-PMAP
R3(config-pmap)# class type inspect IN-NET-CLASS-MAP //定義一個檢測級別類型和參考策略圖
R3(config)# zone-pair security IN-2-OUT-ZPAIR source IN-ZONE destination OUT-ZONE //創建一個區域對IN-2-OUT-ZPAIR對任務一中創建的區域進行源和目的區域定義
R3(config-sec-zone-pair)# service-policy type inspect IN-2-OUT-PMAP
R3(config-sec-zone-pair)# exit
R3(config# interface fa0/1
R3(config-if)# zone-member security IN-ZONE
R3(config-if)# exit
R3(config)# interface s0/1/1
R3(config-if)# zone-member security OUT-ZONE
R3(config-if)# exit
測試
服務器 ping PC端(防火牆阻擋,外網無法ping通PC端)
PC端 ping 服務器