As shown in Figure 1, the FW_A and FW_B connects the headquarters to the Internet, and FW_C connects the branch office to the headquarters. An IPSec tunnel is required between the headquarters and branch office to secure data transmission. The company has multiple branch offices. This example describes only one branch office, whose gateway is FW_C. To improve network reliability, FW_A and FW_B are configured to work in active/standby mode for hot standby. The upstream and downstream devices of the gateways are switches.
Item |
FW_A |
FW_B |
FW_C |
|---|---|---|---|
Interface |
Interface number: GigabitEthernet 0/0/1 IP address: 10.10.0.1/24 Security zone: DMZ |
Interface number: GigabitEthernet 0/0/1 IP address: 10.10.0.2/24 Security zone: DMZ |
Interface number: GigabitEthernet 0/0/1 IP address: 4.4.4.4/24 Security zone: Untrust |
Interface number: GigabitEthernet 0/0/2 IP address: 1.1.1.2/24 VRRP group 2 IP address: 1.1.1.1/24 Security zone: Untrust |
Interface number: GigabitEthernet 0/0/2 IP address: 1.1.1.3/24 VRRP group 2 IP address: 1.1.1.1/24 Security zone: Untrust |
Interface number: GigabitEthernet 0/0/3 IP address: 10.4.1.1/24 Security zone: Trust |
|
Interface number: GigabitEthernet 0/0/3 IP address: 10.3.0.3/24 VRRP group 1 IP address: 10.3.0.2/24 Security zone: Trust |
Interface number: GigabitEthernet 0/0/3 IP address: 10.3.0.4/24 VRRP group 1 IP address: 10.3.0.2/24 Security zone: Trust |
- |
|
IPSec configuration |
IPSec policy type: policy template Pre-shared key: Admin@123 Local ID type: IP address Peer ID type: IP address |
IPSec policy type: policy template Pre-shared key: Admin@123 Local ID type: IP address Peer ID type: IP address |
IPSec policy type: ISAKMP Pre-shared key: Admin@123 Local ID type: IP address Peer ID type: IP address |
After the hot standby function of FW_A and FW_B is enabled, the security policies and IPSec services on FW_A will be automatically backed up to FW_B.
After the hot standby function of FW_A and FW_B is enabled, the security policies and IPSec services on FW_A will be automatically backed up to FW_B. However, route configuration on FW_A is not synchronized to FW_B. Therefore, you need to manually configure routes on FW_B.
HRP_S[FW_B] ip route-static 0.0.0.0 0.0.0.0 1.1.1.254
HRP_S[FW_B] ip route-static 10.4.1.0 255.255.255.0 1.1.1.254
Add the interfaces of each switch in Figure 1 to the same VLAN.
For configuration details, see the switch documents.
Run the display ike sa and display ipsec sa commands on FW_A and FW_B. The command output shows that an IPSec tunnel has been established and tunnel backup succeeds.
# sysname FW_A # hrp interface GigabitEthernet0/0/1 remote 10.10.0.2 hrp enable # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/2 # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/1 # acl 3000 rule 5 permit ip source 10.3.0.0 0.0.0.255 destination 10.4.1.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ike proposal 10 encryption-algorithm aes-256 dh group14 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer any ike-proposal 10 pre-shared-key %^%#;;jt0m=SZ$38VaR"AICQBG.C%^%# # ipsec policy-template policy1 1 security acl 3000 proposal tran1 ike-peer any tunnel local 1.1.1.1 # ipsec policy map1 10 isakmp template policy1 # interface GigabitEthernet0/0/1 undo shutdown ip address 10.10.0.1 255.255.255.0 # interface GigabitEthernet0/0/2 undo shutdown ip address 1.1.1.2 255.255.255.0 vrrp vrid 2 virtual-ip 1.1.1.1 24 active ipsec policy map1 # interface GigabitEthernet0/0/3 undo shutdown ip address 10.3.0.3 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.0.2 24 active # ip route-static 0.0.0.0 0.0.0.0 1.1.1.254 ip route-static 10.4.1.0 255.255.255.0 1.1.1.254 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.3.0.0 255.255.255.0 destination-address 10.4.1.0 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.4.1.0 255.255.255.0 destination-address 10.3.0.0 255.255.255.0 action permit rule name policy_ipsec_3 source-zone local destination-zone untrust source-address 1.1.1.1 255.255.255.255 destination-address 4.4.4.4 255.255.255.255 action permit rule name policy_ipsec_4 source-zone untrust destination-zone local source-address 4.4.4.4 255.255.255.255 destination-address 1.1.1.1 255.255.255.255 action permit # return
# sysname FW_B # hrp interface GigabitEthernet0/0/1 remote 10.10.0.1 hrp enable # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/2 # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/1 # acl 3000 rule 5 permit ip source 10.3.0.0 0.0.0.255 destination 10.4.1.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ike proposal 10 encryption-algorithm aes-256 dh group14 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer any ike-proposal 10 pre-shared-key %^%#!6"\2KlkG@C|L+9HD*H#e>rj%^%# # ipsec policy-template policy1 1 security acl 3000 proposal tran1 ike-peer any tunnel local 1.1.1.1 # ipsec policy map1 10 isakmp template policy1 # interface GigabitEthernet0/0/3 undo shutdown ip address 10.3.0.4 255.255.255.0 vrrp vrid 1 virtual-ip 10.3.0.2 24 standby # interface GigabitEthernet0/0/2 undo shutdown ip address 1.1.1.3 255.255.255.0 vrrp vrid 2 virtual-ip 1.1.1.1 24 standby ipsec policy map1 # interface GigabitEthernet0/0/1 undo shutdown ip address 10.10.0.2 255.255.255.0 # interface GigabitEthernet0/0/1 undo shutdown ip address 10.10.0.2 255.255.255.0 # ip route-static 0.0.0.0 0.0.0.0 1.1.1.254 ip route-static 10.4.1.0 255.255.255.0 1.1.1.254 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.3.0.0 255.255.255.0 destination-address 10.4.1.0 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.4.1.0 255.255.255.0 destination-address 10.3.0.0 255.255.255.0 action permit rule name policy_ipsec_3 source-zone local destination-zone untrust source-address 1.1.1.1 255.255.255.255 destination-address 4.4.4.4 255.255.255.255 action permit rule name policy_ipsec_4 source-zone untrust destination-zone local source-address 4.4.4.4 255.255.255.255 destination-address 1.1.1.1 255.255.255.255 action permit # return
# sysname FW_C # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # acl 3000 rule 5 permit ip source 10.4.1.0 0.0.0.255 destination 10.3.0.0 0.0.0.255 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ike proposal 10 encryption-algorithm aes-256 dh group14 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer a pre-shared-key %^%#[,}r!W>aCD[_]~Ud-Q]~<g_D%^%# ike-proposal 10 remote-address 1.1.1.1 # ipsec policy map1 10 isakmp security acl 3000 ike-peer a proposal tran1 # interface GigabitEthernet0/0/3 undo shutdown ip address 10.4.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 undo shutdown ip address 4.4.4.4 255.255.255.0 ipsec policy map1 # ip route-static 0.0.0.0 0.0.0.0 4.4.4.254 ip route-static 10.3.0.0 255.255.255.0 4.4.4.254 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.4.1.0 255.255.255.0 destination-address 10.3.0.0 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.3.0.0 255.255.255.0 destination-address 10.4.1.0 255.255.255.0 action permit rule name policy_ipsec_3 source-zone local destination-zone untrust source-address 4.4.4.4 255.255.255.255 destination-address 1.1.1.1 255.255.255.255 action permit rule name policy_ipsec_4 source-zone untrust destination-zone local source-address 1.1.1.1 255.255.255.255 destination-address 4.4.4.4 255.255.255.255 action permit # return