Packet Tracer - 綜合技能練習(xí)
地址分配表
設(shè)備 |
接口 |
IP 地址 |
子網(wǎng)掩碼 |
默認(rèn)網(wǎng)關(guān) |
R1 |
G0/0 |
209.165.200.233 |
255.255.255.248 |
不適用 |
S0/0/0 (DCE) |
10.10.10.1 |
255.255.255.252 |
不適用 |
|
環(huán)回接口 1 |
172.20.1.1 |
255.255.255.0 |
不適用 |
|
R2 |
S0/0/0 |
10.10.10.2 |
255.255.255.252 |
不適用 |
S0/0/1 (DCE) |
10.20.20.2 |
255.255.255.252 |
不適用 |
|
R3 |
G0/1 |
172.30.3.1 |
255.255.255.0 |
不適用 |
S0/0/1 |
10.20.20.1 |
255.255.255.252 |
不適用 |
|
S1 |
VLAN 1 |
192.168.10.11 |
255.255.255.0 |
192.168.10.1 |
S2 |
VLAN 1 |
192.168.10.12 |
255.255.255.0 |
192.168.10.1 |
S3 |
VLAN 1 |
172.30.3.11 |
255.255.255.0 |
172.30.3.1 |
ASA |
VLAN 1 (E0/1) |
192.168.10.1 |
255.255.255.0 |
不適用 |
VLAN 2 (E0/0) |
209.165.200.234 |
255.255.255.248 |
不適用 |
|
PC-A |
NIC |
192.168.10.2 |
255.255.255.0 |
192.168.10.1 |
PC-B |
NIC |
192.168.10.3 |
255.255.255.0 |
192.168.10.1 |
PC-C |
NIC |
172.30.3.3 |
255.255.255.0 |
172.30.3.1 |
目標(biāo)
·?????????配置基本的路由器安全性
·?????????配置基本的交換機(jī)安全性
·?????????配置 AAA 本地認(rèn)證
·?????????配置 SSH
·?????????防御登錄攻擊
·?????????配置站點(diǎn)間 IPsec VPN
·?????????配置防火墻和 IPS 設(shè)置
·?????????配置 ASA 基本安全性和防火墻設(shè)置
拓?fù)鋱D
場(chǎng)景
本總結(jié)練習(xí) 考察您在本課程中獲得的許多技能。 路由器和交換機(jī)預(yù)先配置了基本設(shè)備設(shè)置,例如 IP 地址分配和路由。您需要使用 CLI 配置各種 IOS 功能,包括 AAA、SSH 和基于區(qū)域的策略防火墻 (ZPF),以保護(hù)路由器的安全。 您需要配置 R1 和 R3 之間的站點(diǎn)間 VPN。您需要保護(hù) 網(wǎng)絡(luò)上的交換機(jī)的安全。此外,還需要在 ASA 上配置防火墻 功能。
要求
注意:并非所有安全功能都會(huì)在所有設(shè)備上配置 ,但是在生產(chǎn)網(wǎng)絡(luò)中會(huì)配置所有安全功能。
配置基本路由器安全
·?????????在 R1 上執(zhí)行下列配置:
o????最小 密碼長(zhǎng)度為 10 個(gè)字符。
o????加密 明文密碼。
o????特權(quán) EXEC 模式的加密密碼為?ciscoenapa55。
o????控制臺(tái) 線路密碼為?ciscoconpa55,超時(shí)值為?15?分鐘,控制臺(tái) 消息不應(yīng)中斷命令輸入。
o????當(dāng)日消息 (MOTD) 橫幅應(yīng)包括?unauthorized(未經(jīng)授權(quán))一詞。
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#se
R1(config)#secur
R1(config)#secur?
secure security
R1(config)#securi
R1(config)#security pa
R1(config)#security passwords m
R1(config)#security passwords min-length 10
R1(config)#enable secret ciscoenpa55
R1(config)#servic
R1(config)#service pa
R1(config)#service password-encryption
R1(config)#line c
R1(config)#line console 0
R1(config-line)#password ciscoenpa55
R1(config-line)#login
R1(config-line)#exec-timeout 15 0
R1(config-line)#logging synchronous
R1(config-line)#exit
R1(config)#banner motd $ Unauthorized access strictly prohibited and prosecuted to the full extent of the law!$
·?????????在 R2 上執(zhí)行下列配置:
o????特權(quán) EXEC 模式的加密密碼為?ciscoenapa55。
o????VTY 線路 密碼為?ciscovtypa55,超時(shí)值為?15?分鐘并且 需要登錄。
R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#enable secret ciscoenapa55
R2(config)#line vty 0 4
R2(config-line)#password ciscovtypa55
R2(config-line)#exec-timeout 15 0
R2(config-line)#login
R2(config-line)#exit
配置基本的交換機(jī)安全性
·?????????在 S1 上執(zhí)行下列配置:
o????加密 明文密碼。
o????特權(quán) EXEC 模式的加密密碼為?ciscoenapa55。
o????控制臺(tái) 線路密碼為?ciscoconpa55,超時(shí)值為?5?分鐘,控制臺(tái) 消息不應(yīng)中斷命令輸入。
o????VTY 線路 密碼為?ciscovtypa55,超時(shí)值為?5?分鐘并且 需要登錄。
o????MOTD 橫幅 應(yīng)包括?unauthorized(未經(jīng)授權(quán))一詞。
S1>enable
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#service password-encryption
S1(config)#enable secret ciscoenapa55
S1(config)#line console 0
S1(config-line)#password ciscoconpa55
S1(config-line)#exec-timeout 5 0
S1(config-line)#login
S1(config-line)#logging synchronous
S1(config-line)#exit
S1(config)#line vty 0 15
S1(config-line)#password ciscovtypa55
S1(config-line)#exec-timeout 5 0
S1(config-line)#login
S1(config-line)#exit
S1(config)#banner motd $ Unauthorized access strictly prohibited and prosecuted to the full extent of the law! $
·?????????使用以下設(shè)置配置 S1 和 S2 之間的中繼:
o????將模式 設(shè)置為中繼并將 VLAN?99?指定為本征 VLAN。
o????禁用 DTP 幀的生成。
S1(config)#interface f0/1
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 99
S1(config-if)#switchport nonegotiate
S2(config)#interface f0/1
S2(config-if)#switchport mode trunk
S2(config-if)#switchport trunk native vlan 99
S2(config-if)#switchport nonegotiate
·?????????使用以下端口設(shè)置配置 S1:
o????F0/6 應(yīng)僅允許訪問模式,設(shè)置為?PortFast?并啟用 BPDU 防護(hù)。
o????F0/6 使用 基本的默認(rèn)端口安全性,并將動(dòng)態(tài)獲知的 MAC 地址添加到 運(yùn)行配置中。
o????應(yīng)禁用所有其他 端口。
注意:雖然沒有選中所有端口,但 教師可能想要檢驗(yàn)所有未使用的端口是否禁用。
S1(config-if)#interface f0/6
S1(config-if)#switchport mode access
S1(config-if)#spanning-tree portfast
S1(config-if)#spanning-tree bpduguard enable
S1(config-if)#shutdown
S1(config-if)#switchport port-security
S1(config-if)#switchport port-security mac-address sticky
S1(config-if)#no shutdown
S1(config-if)#exit
S1(config)#interface range f0/2-5,f0/7-24,g0/1-2
S1(config-if-range)#shutdown
配置 AAA 本地認(rèn)證
·?????????在 R1 上執(zhí)行下列配置:
o????創(chuàng)建 一個(gè)本地用戶賬戶?Admin01,加密密碼為?Admin01pa55, 權(quán)限級(jí)別為?15。
o????啟用 AAA 服務(wù)。
o????實(shí)施 AAA 服務(wù)時(shí),使用本地?cái)?shù)據(jù)庫(kù)作為第一選項(xiàng),然后使用啟用?密碼作為備用選項(xiàng)。
R1(config)#username Admin01 privilege 15 secret Admin01pa55
R1(config)#aaa new-model
R1(config)#aaa authentication login default local enable
配置 SSH
·?????????在 R1 上執(zhí)行下列配置:
o????域名為?ccnasecurity.com
o????應(yīng)使用?1024?位模數(shù)生成 RSA 密鑰。
o????只允許 使用 SSH 第 2 版。
o????VTY 線路 上只允許使用 SSH。
R1(config)#ip domain-name ccnasecurity.com
R1(config)#crypto key generate rsa
The name for the keys will be: R1.ccnasecurity.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
R1(config)#ip ssh version 2
*Mar 1 0:24:56.377: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#line vty 0 4
R1(config-line)#transport input ssh
·?????????驗(yàn)證 PC-C 是否可以使用 SSH 遠(yuǎn)程訪問 R1 (209.165.200.233)。
防御登錄攻擊
·?????????在 R1 上執(zhí)行下列配置:
o????如果用戶 在 30 秒的時(shí)間范圍內(nèi)兩次登錄都失敗了,請(qǐng)禁用登錄 1 分鐘。
o????記錄所有 失敗的登錄嘗試。
R1(config)#login block-for 60 attempts 2 within 30
R1(config)#login on-failure log
配置站點(diǎn)間 IPsec VPN
注意:部分 VPN 配置不評(píng)分。但是,您應(yīng)該能夠驗(yàn)證 IPsec VPN 隧道之間的連接。
·?????????在 R1 上啟用安全技術(shù)包許可證。
o????在重新加載之前先保存 運(yùn)行配置。
·?????????在 R1 上執(zhí)行下列配置:
o????創(chuàng)建 訪問列表以確定 R1 上需要關(guān)注的流量。
o????配置 ACL?101?以允許從 R1 Lo1 網(wǎng)絡(luò)到 R3 G0/1 LAN 的流量。
·?????????在 R1 上配置?crypto isakmp policy?10?第 1 階段屬性 性以及共享加密密鑰?ciscovpnpa55。使用以下 參數(shù):
o????密鑰 分配方法:ISAKMP
o????加密:?aes 256
o????散列:sha
o????認(rèn)證驗(yàn)證 方法:pre-shared
o密鑰 交換:DH 組 5
o????IKE SA 生命周期:3600
o????ISAKMP 密鑰:ciscovpnpa55
·?????????創(chuàng)建?轉(zhuǎn)換集?VPN-SET?以使用?esp-aes 256?和?esp-sha-hmac。 然后創(chuàng)建將所有第 2 階段參數(shù)捆綁 在一起的加密映射?CMAP。使用序號(hào)?10?并將其確定為?ipsec-isakmp?映射。使用以下參數(shù):
o????轉(zhuǎn)換 集:?VPN-SET
o轉(zhuǎn)換 加密:esp-aes 256
o轉(zhuǎn)換 認(rèn)證:esp-sha-hmac
o????完全 向前保密 (PFS):group5
o加密映射 名稱:CMAP
o????SA 建立:?ipsec isakmp
o????將 加密映射 (CMAP) 綁定到傳出接口。
·?????????驗(yàn)證是否啟用了安全技術(shù)包許可證。在 R3 上重復(fù) 站點(diǎn)間 VPN 配置,以便它們鏡像 R1 中的所有 配置。
·?????????從 PC-C 上的 R1 ping 通 Lo1 接口 (172.20.1.1),使用?show crypto ipsec sa?命令驗(yàn)證包的的數(shù)量是否大于 0,若 大于 0 則表明 IPsec VPN 隧道正在工作。
R1(config)#access-list 101 permit ip 172.20.1.0 0.0.0.255 172.30.3.0 0.0.0.255
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#encryption aes 256
R1(config-isakmp)#authentication pre-share
R1(config-isakmp)#hash sha
R1(config-isakmp)#group 5
R1(config-isakmp)#lifetime 3600
R1(config-isakmp)#exit
R1(config)#crypto isakmp key ciscovpnpa55 address 10.20.20.1
R1(config)#crypto ipsec transform-set VPN-SET esp-aes 256 esp-sha-hmac
R1(config)#crypto map CMAP 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
R1(config-crypto-map)#set peer 10.20.20.1
R1(config-crypto-map)#set pfs group5
R1(config-crypto-map)#set transform-set VPN-SET
R1(config-crypto-map)#match address 101
R1(config-crypto-map)#exit
R1(config)#interface S0/0/0
R1(config-if)#crypto map CMAP
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
R1(config-if)#exit
R1(config)#end
R3>en
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#access-list 101 permit ip 172.30.3.0 0.0.0.255 172.20.1.0 0.0.0.255
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#encryption aes 256
R3(config-isakmp)#authentication pre-share
R3(config-isakmp)#hash sha
R3(config-isakmp)#group 5
R3(config-isakmp)#lifetime 3600
R3(config-isakmp)#exit
R3(config)#crypto isakmp key ciscovpnpa55 address 10.10.10.1
R3(config)#crypto ipsec transform-set VPN-SET esp-aes 256 esp-sha-hmac
R3(config)#crypto map CMAP 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
R3(config-crypto-map)#set peer 10.10.10.1
R3(config-crypto-map)#set transform-set VPN-SET
R3(config-crypto-map)#match address 101
R3(config-crypto-map)#exit
R3(config)#interface S0/0/1
R3(config-if)#crypto map CMAP
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
R3(config-if)#end
配置防火墻和 IPS 設(shè)置
·?????????使用以下要求在 R3 上配置 ZPF:
o????創(chuàng)建名為 IN-ZONE?和?OUT-ZONE?的區(qū)域。
o????創(chuàng)建 用于定義內(nèi)部流量的 ACL 編號(hào) 110,允許從?172.30.3.0/24?源網(wǎng)絡(luò)傳送到 任何目的地的所有 IP?協(xié)議。
·?????????創(chuàng)建名為?INTERNAL-CLASS-MAP?的類映射,使用?match-all?選項(xiàng)和 ACL?110。
·?????????創(chuàng)建名為?IN-2-OUT-PMAP?的策略映射,使用 類映射?INTERNAL-CLASS-MAP?來(lái)檢查所有匹配的流量。
·?????????創(chuàng)建名為?IN-2-OUT-ZPAIR?的區(qū)域?qū)Γ瑢?IN-ZONE?指定為源區(qū)域,將?OUT-ZONE?指定為目的區(qū)域。
o????指定 IN-2-OUT-PMAP?策略映射用于檢查兩個(gè)區(qū)域之間的流量。
o????將 G0/1 指定為 IN-ZONE?成員,將 S0/0/1 指定為OUT-ZONE?成員。
R3(config)#zone security IN-ZONE
R3(config-sec-zone)#zone security OUT-ZONE
R3(config-sec-zone)#exit
R3(config)#zone security OUT-ZONE
R3(config-sec-zone)#exit
R3(config)#access-list 110 permit ip 172.30.3.0 0.0.0.255 any
R3(config)#access-list 110 deny ip any any
R3(config)#class-map type inspect match-all INTERNAL-CLASS-MAP
R3(config-cmap)#match access-group 110
R3(config-cmap)#exit
R3(config)#policy-map type inspect IN-2-OUT-PMAP
R3(config-pmap)#class type inspect INTERNAL-CLASS-MAP
R3(config-pmap-c)#inspect
%No specific protocol configured in class INTERNAL-CLASS-MAP for inspection. All protocols will be inspected
R3(config-pmap-c)#exit
R3(config-pmap)#policy-map type inspect IN-2-OUT-PMAP
class-default System default class matching otherwise unclassified packets
type type of the class-map
R3(config-pmap)#exit
R3(config)#zone-pair security IN-2-OUT-ZPAIR source IN-ZONE destination OUT-ZONE
R3(config-sec-zone-pair)#service-policy type inspect IN-2-OUT-PMAP
R3(config-sec-zone-pair)#exit
R3(config)#interface g0/1
R3(config-if)#zone-member security IN-ZONE
R3(config-if)#exit
R3(config)#interface s0/0/1
R3(config-if)#zone-member security OUT-ZONE
R3(config-if)#exit
R3(config)#end
·?????????使用以下要求在 R3 上配置 IPS:
注意:在 Packet Tracer 中,路由器已導(dǎo)入并實(shí)施了簽名文件。 它們是閃存 中的默認(rèn) XML 文件。出于此原因,不需要配置加密 公鑰和完成簽名文件的手動(dòng)導(dǎo)入。
o????在名為 ipsdir?的閃存中創(chuàng)建目錄并將其設(shè)置為存儲(chǔ) IPS 簽名的位置。
o????創(chuàng)建名為 IPS-RULE?的?IPS 規(guī)則。
o????使用 retired true?命令停用全部簽名類別(簽名版本中的所有 簽名)。
o????使用 retired false?命令取消停用?IOS_IPS Basic?類別。
o????在 S0/0/1 接口的入站方向應(yīng)用 該規(guī)則。
R3#mkdir ipsdir
Create directory filename [ipsdir]?
Created dir flash:ipsdir
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#ip ips config location flash:ipsdir
R3(config)#ip ips name IPS-RULE
R3(config)#ip ips signature-category
R3(config-ips-category)#category all
R3(config-ips-category-action)#retired true
R3(config-ips-category-action)#exit
R3(config-ips-category)#category ios_ips basic
R3(config-ips-category-action)#retired false
R3(config-ips-category-action)#exit
R3(config-ips-category)#exit
Do you want to accept these changes? [confirm]
Applying Category configuration to signatures ...
%IPS-6-ENGINE_BUILDING: atomic-ip - 288 signatures - 6 of 13 engines
%IPS-6-ENGINE_READY: atomic-ip - build time 30 ms - packets for this engine will be scanned
R3(config)#interface s0/0/1
R3(config-if)#ip ips IPS-RULE in
R3(config-if)#
%IPS-6-ENGINE_BUILDS_STARTED: 00:45:30 UTC 3月 01 1993
%IPS-6-ENGINE_BUILDING: atomic-ip - 3 signatures - 1 of 13 engines
%IPS-6-ENGINE_READY: atomic-ip - build time 8 ms - packets for this engine will be scanned
%IPS-6-ALL_ENGINE_BUILDS_COMPLETE: elapsed time 8 ms
R3(config-if)#
配置 ASA 基本安全性和防火墻設(shè)置
·?????????使用以下設(shè)置配置 VLAN 接口:
o????對(duì)于 VLAN 1 接口,將地址分配配置為使用?192.168.10.1/24。
o????對(duì)于 VLAN 2 接口,刪除默認(rèn) DHCP 設(shè)置并將地址分配配置為 使用?209.165.200.234/29。
·?????????使用以下設(shè)置配置主機(jī)名、域名、啟用密碼和控制臺(tái) 密碼:
o????ASA 主機(jī)名為?CCNAS-ASA。
o????域名為?ccnasecurity.com。
o????啟用模式密碼為?ciscoenapa55。
·?????????創(chuàng)建用戶并將 AAA 配置為使用本地?cái)?shù)據(jù)庫(kù)進(jìn)行 遠(yuǎn)程認(rèn)證。
o????配置名為 admin?的本地用戶賬戶,密碼為?adminpa55。請(qǐng) 勿使用加密屬性。
o????將 AAA 配置為使用本地 ASA 數(shù)據(jù)庫(kù)進(jìn)行 SSH 用戶認(rèn)證。
o????允許從外部主機(jī) 172.30.3.3?訪問 SSH ,超時(shí)值為?10?分鐘。
·?????????使用以下設(shè)置將 ASA 配置為 DHCP 服務(wù)器:
o????向內(nèi)部 DHCP 客戶端分配從 192.168.10.5 到 192.168.10.30 的 IP 地址。
o????啟用 DHCP 以偵聽 DHCP 客戶端請(qǐng)求。
·?????????配置靜態(tài)路由和 NAT。
o????創(chuàng)建 創(chuàng)建到下一跳路由器 (R1) IP 地址的靜態(tài)默認(rèn)路由。
o????創(chuàng)建 名為?inside-net?的網(wǎng)絡(luò)對(duì)象,并使用?subnet?和?nat?命令向其分配屬性。
o????創(chuàng)建 到外部接口的動(dòng)態(tài) NAT 轉(zhuǎn)換。
·?????????使用 以下設(shè)置修改 ASA 上的思科模塊化策略框架 (MPF):
o????將?class-map?inspection_default?配置為?match default-inspection-traffic,然后退出到全局配置模式。
o????配置?策略映射列表?global_policy。輸入?class inspection_default?,并輸入命令?inspect icmp。然后退出到全局 配置模式。
o????配置 MPF?服務(wù)策略,以在全局范圍內(nèi)應(yīng)用?global_policy。
ciscoasa>en
Password:
ciscoasa#conf t
ciscoasa(config)#interface vlan 1
ciscoasa(config-if)#nameif inside
ciscoasa(config-if)#security-level 100
ciscoasa(config-if)#ip address 192.168.10.1 255.255.255.0
ciscoasa(config-if)#interface vlan 2
ciscoasa(config-if)#nameif outside
ciscoasa(config-if)#security-level 0
ciscoasa(config-if)#no ip address dhcp
WARNING: DHCPD bindings cleared on interface 'outside', address pool removed
ciscoasa(config-if)#ip address 209.165.200.234 255.255.255.248
ciscoasa(config-if)#exit
ciscoasa(config)#hostname CCNAS-ASA
CCNAS-ASA(config)#domain-name ccnasecurity.com
CCNAS-ASA(config)#enable password ciscoenapa55
CCNAS-ASA(config)#username admin password adminpa55
CCNAS-ASA(config)#aaa authentication ssh console LOCAL
CCNAS-ASA(config)#ssh 192.168.10.0 255.255.255.0 inside
CCNAS-ASA(config)#ssh 172.30.3.3 255.255.255.255 outside
CCNAS-ASA(config)#ssh timeout 10
CCNAS-ASA(config)#dhcpd address 192.168.10.5-192.168.10.30 inside
CCNAS-ASA(config)#dhcpd enable inside
CCNAS-ASA(config)#route outside 0.0.0.0 0.0.0.0 209.165.200.233
CCNAS-ASA(config)#object network inside-net
CCNAS-ASA(config-network-object)#subnet 192.168.10.0 255.255.255.0
CCNAS-ASA(config-network-object)#nat (inside,outside) dynamic interface
CCNAS-ASA(config-network-object)#exit
CCNAS-ASA#conf t
CCNAS-ASA(config)#class-map inspection_default
CCNAS-ASA(config-cmap)#match default-inspection-traffic
CCNAS-ASA(config-cmap)#exit
CCNAS-ASA(config)#policy-map global_policy
CCNAS-ASA(config-pmap)#class inspection_default
CCNAS-ASA(config-pmap-c)#inspect icmp
CCNAS-ASA(config-pmap-c)#exit
CCNAS-ASA(config)#service-policy global_policy global
CCNAS-ASA(config)#
實(shí)驗(yàn)?zāi)_本:
!-------------------------------
!配置基本路由器安全
!-------------------------------
!R1
conf t
security passwords min-length 10
enable secret ciscoenapa55
service password-encryption
line console 0
password ciscoconpa55
exec-timeout 15 0
login
logging synchronous
banner motd $Unauthorized access strictly prohibited and prosecuted to the full extent of the law!$
end
!R2
conf t
enable secret ciscoenapa55
line vty 0 4
password ciscovtypa55
exec-timeout 15 0
login
end
!-------------------------
!配置基本的交換機(jī)安全性
!-------------------------
!S1
conf t
service password-encryption
enable secret ciscoenapa55
line console 0
password ciscoconpa55
exec-timeout 5 0
login
logging synchronous
line vty 0 15
password ciscovtypa55
exec-timeout 5 0
login
banner motd $Unauthorized access strictly prohibited and prosecuted to the full extent of the law!$
end
!中繼
!S1 and S2
conf t
interface FastEthernet 0/1
switchport mode trunk
switchport trunk native vlan 99
switchport nonegotiate
end
!S1 端口安全
conf t
interface FastEthernet 0/6
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enable
shutdown
switchport port-security
switchport port-security mac-address sticky
no shutdown
interface range f0/2 – 5 , f0/7 – 24 , g0/1 - 2
shutdown
end
!----------------------------------
!配置 AAA 本地認(rèn)證
!----------------------------------
!R1
conf t
username Admin01 privilege 15 secret Admin01pa55
aaa new-model
aaa authentication login default local enable
end
!-------------------------
!配置 SSH
!-------------------------
!R1
conf t
ip domain-name ccnasecurity.com
crypto key generate rsa
1024
ip ssh version 2
line vty 0 4
transport input ssh
end
!----------------------------
!防御登錄攻擊
!----------------------------
!R1
conf t
login block-for 60 attempts 2 within 30
login on-failure log
end
!---------------------------------
!配置站點(diǎn)間 IPsec VPN
!---------------------------------
!R1
conf t
access-list 101 permit ip 172.20.1.0 0.0.0.255 172.30.3.0 0.0.0.255
crypto isakmp policy 10
encryption aes 256
authentication pre-share
hash sha
group 5
lifetime 3600
exit
crypto isakmp key ciscovpnpa55 address 10.20.20.1
crypto ipsec transform-set VPN-SET esp-aes 256 esp-sha-hmac
crypto map CMAP 10 ipsec-isakmp
set peer 10.20.20.1
set pfs group5
set transform-set VPN-SET
match address 101
exit
interface S0/0/0
crypto map CMAP
end
!R3
conf t
access-list 101 permit ip 172.30.3.0 0.0.0.255 172.20.1.0 0.0.0.255
crypto isakmp policy 10
encryption aes 256
authentication pre-share
hash sha
group 5
lifetime 3600
exit
crypto isakmp key ciscovpnpa55 address 10.10.10.1
crypto ipsec transform-set VPN-SET esp-aes 256 esp-sha-hmac
crypto map CMAP 10 ipsec-isakmp
set peer 10.10.10.1
set transform-set VPN-SET
match address 101
exit
interface S0/0/1
crypto map CMAP
end
!-----------------------------------
!配置防火墻和 IPS 設(shè)置
!-----------------------------------
!R3
conf t
!Firewall configs
zone security IN-ZONE
zone security OUT-ZONE
access-list 110 permit ip 172.30.3.0 0.0.0.255 any
access-list 110 deny ip any any
class-map type inspect match-all INTERNAL-CLASS-MAP
match access-group 110
exit
policy-map type inspect IN-2-OUT-PMAP
class type inspect INTERNAL-CLASS-MAP
inspect
zone-pair security IN-2-OUT-ZPAIR source IN-ZONE destination OUT-ZONE
service-policy type inspect IN-2-OUT-PMAP
exit
interface g0/1
zone-member security IN-ZONE
exit
interface s0/0/1
zone-member security OUT-ZONE
end
!配置IPS
mkdir ipsdir
conf t
ip ips config location flash:ipsdir
ip ips name IPS-RULE
ip ips signature-category
category all
retired true
exit
category ios_ips basic
retired false
exit
<Enter>
interface s0/0/1
ip ips IPS-RULE in
!--------------------------------------------------
!配置 ASA 基本安全性和防火墻設(shè)置
!--------------------------------------------------
!CCNAS-ASA
enable
<Enter>
conf t
interface vlan 1
nameif inside
security-level 100
ip address 192.168.10.1 255.255.255.0
interface vlan 2
nameif outside
security-level 0
no ip address dhcp
ip address 209.165.200.234 255.255.255.248
exit
hostname CCNAS-ASA
domain-name ccnasecurity.com
enable password ciscoenapa55
username admin password adminpa55
aaa authentication ssh console LOCAL
ssh 192.168.10.0 255.255.255.0 inside
ssh 172.30.3.3 255.255.255.255 outside
ssh timeout 10
dhcpd address 192.168.10.5-192.168.10.30 inside
dhcpd enable inside
route outside 0.0.0.0 0.0.0.0 209.165.200.233
object network inside-net
subnet 192.168.10.0 255.255.255.0
nat (inside,outside) dynamic interface
exit
conf t
class-map inspection_default
match default-inspection-traffic
exit
policy-map global_policy
class inspection_default
inspect icmp
exit
service-policy global_policy global
實(shí)驗(yàn)鏈接:https://pan.baidu.com/s/1urVfIaOtOyJGxqh7XS2adQ?pwd=1131
提取碼:1131文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-513325.html
--來(lái)自百度網(wǎng)盤超級(jí)會(huì)員V2的分享文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-513325.html
到了這里,關(guān)于Packet Tracer - 綜合技能練習(xí)(配置各種 IOS 功能,包括 AAA、SSH 和基于區(qū)域的策略防火墻 (ZPF),以保護(hù)路由器的安全)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!