視頻來源:B站《乾頤堂HCIP-HCIE-security安全 2019年錄製》
一邊學習一邊整理老師的課程內容及試驗筆記,並與大家分享,侵權即刪,謝謝支持!
附上匯總貼:華為防火牆基礎自學系列 | 匯總_COCOgsta的博客-CSDN博客
Site to Site IPSec VPN組網
這個一個典型的站點到站點(Site to Site)IPSec VPN拓撲
IPSec VPN組網的通信網絡為10.1.1.0/24和10.1.2.0/24(感興趣流),加密點為兩個防火牆的外部接口地址。
交換機底層橋接
防火牆網絡配置
IPsec VPN安全策略配置流程圖
FW1配置IPSec策略-1(Web)
新建IPsec策略
FW1配置IPsec策略-2(Web)
填寫IPsec基本配置
FW1配置IPsec策略-3(Web)
新建感興趣流
FW1配置IPsec策略-4(Web)
配置安全提議,保持默認即可。
FW1配置安全策略-1(Web)
新建服務【isakmp】,UDP協議,目的端口為500。
FW1配置安全策略-2(Web)
新建安全策略,放行兩個防火牆的esp和isakmp流量。
放行本端感興趣流,去往對端的流量。
FW1配置IPsec-1(CLI)
FW1配置ACL
FW1配置ike Proposal
FW1配置IKE Peer
FW1配置IPsec-2(CLI)
FW1配置IPsec proposal
FW1配置IPsec policy
FW1調用IPsec policy
FW1配置安全策略(CLI)
FW2配置IPsec策略-1(Web)
新建IPsec策略,填寫IPsec基本配置。
FW2配置IPsec策略-2(Web)
配置安全提議,保持默認即可。
FW2配置安全策略-1(Web)
新建服務【isakmp】,UDP協議,目的端口為500。
新建安全策略,放行兩個防火牆的esp和isakmp流量。
放行本端感興趣流,去往對端的流量。
FW2配置IPsec-1(CLI)
FW2配置ACL
FW2配置IKE Proposal
FW2配置IKE Peer
FW2配置IPsec-2(CLI)
FW2配置IPsec proposal
FW1配置IPsec policy
FW1調用IPsec policy
FW2配置安全策略(CLI)
FW1查看IPsec狀態(Web)
點擊【監控】,查看IPsec協商狀態。
IPsec通信網絡測試
在PC1上ping測試到PC2的地址,測試感興趣流的連通性。
FW1查看IKE SA
FW1查看IPsec SA
FW1查看加解密數量
實驗
SW1
interface Ethernet0/0/4
description Link_FW1_G0/0/0
port link-type access
port default vlan 16
interface Ethernet0/0/8
description Link_FW2_G0/0/0
port link-type access
port default vlan 16
interface Ethernet0/0/21
description Link_HCNP_MGMT
port link-type access
port default vlan 16
interface Ethernet0/0/1
description Link_FW1_G0/0/1
port link-type access
port default vlan 10
interface Ethernet0/0/9
description Link_HCNP_Dot1x(PC1)
port link-type access
port default vlan 10
interface Ethernet0/0/5
description Link_FW2_G0/0/1
port link-type access
port default vlan 20
interface Ethernet0/0/24
description Link_HCNP_VPN_Client(PC2)
port link-type access
port default vlan 20
interface Ethernet0/0/2
description Link_FW1_G0/0/2
port link-type access
port default vlan 40
interface Ethernet0/0/23
description Link_HCNP_Untrust
port link-type access
port default vlan 40
interface Ethernet0/0/6
description Link_FW2_G0/0/2
port link-type access
port default vlan 40
複製代碼
FW1
int g0/0/0
ip address 192.168.0.10 24
int g0/0/1
ip address 10.1.1.10 24
int g0/0/2
ip address 202.100.1.10 24
firewall zone trust
add int g0/0/1
firewall zone untrust
add int g0/0/2
ip route-static 0.0.0.0 0.0.0.0 202.100.1.11
ike proposal 10
encryption-algorithm aes-192
authentication-algorithm md5
ike peer fw2
exchange-mode main
pre-shared-key Huawei@123
ike-proposal 10
remote-address 202.100.1.11
undo version 2
acl 3000
rule permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
ipsec proposal 10
encapsulation-mode tunnel
esp encryption-algorithm des
esp authentication-algorithm sha1
ipsec policy ipsec_policy 10 isakmp
security acl 3000
ike-peer fw2
proposal 10
int g0/0/2
ipsec policy ipsec_policy
複製代碼
FW2
int g0/0/0
ip addres 192.168.0.11 24
int g0/0/1
ip address 10.1.2.10 24
int g0/0/2
ip address 202.100.1.11 24
service-manage ping permit
firewall zone untrust
add int g0/0/2
firewall zone trust
add int g0/0/1
ip route-static 0.0.0.0 0.0.0.0 202.100.1.10
ike proposal 10
encryption-algorithm aes-192
authentication-algorithm md5
ike peer fw1
exchange-mode main
pre-shared-key Huawei@123
ike-proposal 10
remote-address 202.100.1.10
undo version 2
acl 3000
rule permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
ipsec proposal 10
encapsulation-mode tunnel
esp encryption-algorithm des
esp authentication-algorithm sha1
ipsec policy ipsec_policy 10 isakmp
security acl 3000
ike-peer fw1
proposal 10
int g0/0/2
ipsec policy ipsec_policy
複製代碼
查看
在ipsec policy沒有配置auto-neg下,需要先在PC上通過PING觸發IPSec隧道建立。(前提是防火牆策略已經配置完成,如local<->untrust,需放通ISKAMP和ESP,trust<->unstrust,需放通地址間所有流量)