As shown in Figure 1, the branch and the headquarters connect to the Internet through FW_A and FW_B respectively. FW_C is deployed between FW_B and L3SW (Layer-3 switch) at Layer 2 in transparent mode. The user needs to establish IPSec tunnels between FW_A and FW_C to ensure the secure communication between the branch and the headquarters.
Item |
Data |
Description |
|
|---|---|---|---|
FW_A |
(1) |
Interface ID: GigabitEthernet 0/0/1 IP address: 10.1.1.1/24 Security zone: Trust |
- |
(2) |
Interface ID: GigabitEthernet 0/0/2 IP address: 1.1.1.1/24 Security zone: Untrust |
- |
|
IPSec configuration |
Establishment method: non-policy template Encapsulation mode: tunnel mode Security protocol: ESP ESP authentication algorithm: SHA2-256 ESP encryption algorithm: AES-256 IKE negotiation mode: main mode Pre-shared IKE key: Admin@123 IKE authentication algorithm: SHA2 NAT traversal: enabled IKE version: IKEv1 |
- |
|
FW_B |
(3) |
Interface ID: GigabitEthernet 0/0/2 IP address: 2.2.2.2/24 Security zone: Untrust |
- |
(4) |
Interface ID: GigabitEthernet 0/0/1 IP address: 10.2.1.1/24 Security zone: Trust |
- |
|
NAT server configuration |
Global IP address: 3.1.1.1 Inside IP address: 10.2.1.3 |
The inside IP address is the IP address of the VLANIF1 on the FW_C. |
|
FW_C |
(5) |
Interface ID: GigabitEthernet 0/0/1 Mode: Layer 2 VLAN ID: 10 Security zone: Untrust |
Connects to FW_B and applies IPSec policies. |
(6) |
Interface ID: GigabitEthernet 0/0/2 Mode: Layer 2 VLAN ID: 1 Security zone: Trust |
Connects to the L3SW device. |
|
VLANIF10 |
IP address: 10.2.1.3/24 Security zone: Trust |
- |
|
IPSec configuration |
Establishment method: policy template Encapsulation mode: tunnel mode Security protocol: ESP ESP authentication algorithm: SHA2-256 ESP encryption algorithm: AES-256 IKE negotiation mode: main mode Pre-shared IKE key: Admin@123 IKE authentication algorithm: SHA2 NAT traversal: enabled IKE version: IKEv1 |
- |
|
L3SW |
(7) |
Interface ID: GigabitEthernet 0/0/1 VLAN ID: 1 |
- |
(8) |
Interface ID: GigabitEthernet 0/0/2 VLAN ID: 3 |
- |
|
VLANIF110 |
IP address: 10.2.1.2/24 |
- |
|
VLANIF120 |
IP address: 10.4.1.1/24 |
The IP address of VLANIF120 is the intranet gateway. |
|
FW_A serves as the egress gateway of the branch and establishes IPSec tunnels with the headquarters in non-template mode.
The branch users can successfully access the server of the headquarters.
On FW_C, run display ipsec sa brief commands. IPSec tunnels are established successfully.
<FW_C> display ipsec sa brief
Current ipsec sa num:4
Spu board slot 1, cpu 1 ipsec sa information:
Number of SAs:2
Src address Dst address SPI VPN Protocol Algorithm
-------------------------------------------------------------------------------
1.1.1.1 10.2.1.3 4001819557 ESP E:AES-256 A:SHA2-256-128
10.2.1.3 1.1.1.1 3923280450 ESP E:AES-256 A:SHA2-256-128
Configuration scripts of FW_A.
# sysname FW_A # interface GigabitEthernet0/0/1 undo shutdown ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 undo shutdown ip address 1.1.1.1 255.255.255.0 ipsec policy map1 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/1 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/2 # acl number 3001 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.4.1.0 0.0.0.255 # ike proposal 1 authentication-algorithm sha2-256 dh group14 # ike peer peer1 undo version 2 pre-shared-key %$%$||{WY}=Bx3E[HD)g}9{Yu\SJ%$%$ ike-proposal 1 remote-address 3.1.1.1 remote-address authentication-address 10.2.1.3 # ipsec proposal tran1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy map1 10 isakmp security acl 3001 ike-peer peer1 proposal tran1 # ip route-static 3.1.1.0 255.255.255.0 1.1.1.2 ip route-static 10.4.1.0 255.255.255.0 1.1.1.2 # security-policy rule name 1 source-zone trust destination-zone untrust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.4.1.0 mask 255.255.255.0 action permit rule name 2 source-zone untrust destination-zone trust source-address 10.4.1.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name 3 source-zone local destination-zone untrust source-address 1.1.1.0 mask 255.255.255.0 destination-address 3.1.1.0 mask 255.255.255.0 action permit rule name 4 source-zone untrust destination-zone local source-address 3.1.1.0 mask 255.255.255.0 destination-address 1.1.1.0 mask 255.255.255.0 action permit # return
Configuration scripts of FW_B.
# sysname FW_B # interface GigabitEthernet0/0/1 undo shutdown ip address 10.2.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 undo shutdown ip address 2.2.2.2 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/1 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/2 # nat server nats global 3.1.1.1 inside 10.2.1.3 # ip route-static 1.1.1.0 255.255.255.0 2.2.2.1 # return
Configuration scripts of FW_C.
# sysname FW_C # vlan obscure enable # interface Vlanif1 alias VLAN1 ip address 10.2.1.3 255.255.255.0 # interface GigabitEthernet0/0/1 portswitch undo shutdown port link-type access ipsec policy policy1 # interface GigabitEthernet0/0/2 portswitch undo shutdown port link-type access # firewall zone trust set priority 85 add interface GigabitEthernet0/0/2 add interface Vlanif1 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # acl number 3001 rule 5 permit ip source 10.4.1.0 0.0.0.255 destination 10.1.1.0 0.0.0.255 # ike proposal 1 authentication-algorithm sha2-256 dh group14 # ike peer peer1 undo version 2 pre-shared-key %$%$||{WY}=Bx3E[HD)g}9{Yu\SJ%$%$ ike-proposal 1 # ipsec proposal p1 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy-template template1 1 acl 3001 ike-peer peer1 proposal p1 # ip route-static 1.1.1.0 255.255.255.0 10.2.1.1 ip route-static 10.4.1.0 255.255.255.0 10.2.1.2 # security-policy rule name 1 source-zone trust destination-zone untrust source-address 10.4.1.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 action permit rule name 2 source-zone untrust destination-zone trust source-address 10.1.1.0 mask 255.255.255.0 destination-address 10.4.1.0 mask 255.255.255.0 action permit rule name 3 source-zone local destination-zone trust source-address 10.2.1.0 mask 255.255.255.0 destination-address 1.1.1.0 mask 255.255.255.0 action permit rule name 4 source-zone trust destination-zone local source-address 1.1.1.0 mask 255.255.255.0 destination-address 10.2.1.0 mask 255.255.255.0 action permit # return