This section provides an example to describe how to enable the headquarters and branches to establish IPSec VPN tunnels in between.
As shown in Figure 1, an enterprise has a headquarters and multiple branches, and the FWs are the egress gateways of the headquarters and branches. The headquarters egress gateway FW_A has a fixed IP address. The enterprise requires that IPSec VPN tunnels be established between the headquarters and branches for communication security.
The configuration roadmap is as follows:
Complete basic and routing configurations on interfaces and enable security policies.
Note that you do not need to set the peer IP address when configuring FW_A, because the peer IP address is not fixed. When you configure FW_B and FW_C, you need to set the peer IP address.
The roadmaps for configuring FW_A, FW_B, and FW_C are the same.
Item |
FW_A |
FW_B |
FW_C |
|---|---|---|---|
Interface configuration |
Interface number: GigabitEthernet 0/0/1 IP address: 1.1.3.1/24 Security zone: untrust Interface number: GigabitEthernet 0/0/3 IP address: 10.1.1.1/24 Security zone: trust |
Interface number: GigabitEthernet 0/0/1 IP address: 1.1.5.1/24 Security zone: untrust Interface number: GigabitEthernet 0/0/3 IP address: 10.1.2.1/24 Security zone: trust |
Interface number: GigabitEthernet 0/0/1 IP address: 1.1.6.1/24 Security zone: untrust Interface number: GigabitEthernet 0/0/3 IP address: 10.1.3.1/24 Security zone: trust |
IPSec configuration |
Scenario: point-to-multipoint Peer IP address: not configured Authentication mode: pre-shared key Pre-shared key: Test@123 Local ID: IP address Peer ID: any peer ID |
Scenario: point-to-point Peer IP address: 1.1.3.1 Authentication mode: pre-shared key Pre-shared key: Test@123 Local ID: IP address Peer ID: IP address |
Scenario: point-to-point Peer IP address: 1.1.3.1 Authentication mode: pre-shared key Pre-shared key: Test@123 Local ID: IP address Peer ID: IP address |
Configure FW_C by referring to the configurations of FW_B.
# acl number 3005 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255 rule 10 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.3.0 0.0.0.255 # ike proposal 4 encryption-algorithm aes-256 dh group2 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer ike281142050612 pre-shared-key %@%@"@^z$/|AD456.#D#gmH8W+GD%@%@ ike-proposal 4 local-id 1.1.3.1 # ipsec proposal prop28114205061 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy-template tpl281142050612 1 security acl 3005 ike-peer ike281142050612 proposal prop28114205061 alias policy1 # ipsec policy ipsec2811420508 10000 isakmp template tpl281142050612 # interface GigabitEthernet0/0/3 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 1.1.3.1 255.255.255.0 ipsec policy ipsec2811420508 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # ip route-static 0.0.0.0 0.0.0.0 1.1.3.2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.2.0 mask 255.255.255.0 destination-address 10.1.3.0 mask 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.2.0 mask 255.255.255.0 source-address 10.1.3.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local destination-address 1.1.3.1 mask 255.255.255.255 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.3.1 mask 255.255.255.255 action permit
# acl number 3000 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ike proposal 1 encryption-algorithm aes-256 dh group2 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer ike281142213393 pre-shared-key %@%@X3c2!T#j2$U2^/)2:^65tK]X%@%@ ike-proposal 1 remote-id-type ip remote-id 1.1.3.1 local-id 1.1.5.1 remote-address 1.1.3.1 # ipsec proposal prop28114221339 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy ipsec2811422136 1 isakmp security acl 3000 ike-peer ike281142213393 proposal prop28114221339 tunnel local applied-interface alias policy1 sa trigger-mode auto # interface GigabitEthernet0/0/3 ip address 10.1.2.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 1.1.5.1 255.255.255.0 ipsec policy ipsec2811422136 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # ip route-static 0.0.0.0 0.0.0.0 1.1.5.2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.2.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.2.0 mask 255.255.255.0 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local destination-address 1.1.5.1 mask 255.255.255.255 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.5.1 mask 255.255.255.255 action permit
# acl number 3000 rule 5 permit ip source 10.1.3.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ike proposal 1 encryption-algorithm aes-256 dh group2 authentication-algorithm sha2-256 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 # ike peer ike281142213393 pre-shared-key %@%@X3c2!T#j2$U2^/)2:^65tK]X%@%@ ike-proposal 1 remote-id-type ip remote-id 1.1.3.1 local-id 1.1.6.1 remote-address 1.1.3.1 # ipsec proposal prop28114221339 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy ipsec2811422136 1 isakmp security acl 3000 ike-peer ike281142213393 proposal prop28114221339 tunnel local applied-interface alias policy1 sa trigger-mode auto # interface GigabitEthernet0/0/3 ip address 10.1.3.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 1.1.6.1 255.255.255.0 ipsec policy ipsec2811422136 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # ip route-static 0.0.0.0 0.0.0.0 1.1.6.2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.3.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.3.0 mask 255.255.255.0 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local destination-address 1.1.6.1 mask 255.255.255.255 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.6.1 mask 255.255.255.255 action permit