This section describes how to configure the IPSec VPN tunnel between two gateways with fixed IP addresses. In this example, both ends can initiate negotiations.
As shown in Figure 1, FW_A connects network A to the Internet and FW_B connects network B to the Internet. The networking requirements are as follows:
Network A (10.1.1.0/24) is connected to GigabitEthernet 0/0/3 of FW_A.
Network B (10.1.2.0/24) is connected to GigabitEthernet 0/0/3 of FW_B.
The purpose of this networking is to set up an IPSec tunnel between FW_A and FW_B and to enable the communication between users on network A and network B.
Item |
Data |
|---|---|
FW_A |
Interface: GigabitEthernet 0/0/3 IP address: 10.1.1.1/24 Security zone: Trust |
Interface: GigabitEthernet 0/0/1 IP address: 1.1.3.1/24 Security zone: Untrust |
|
IPSec configuration Scenario: Site-to-site Peer IP Address: 1.1.5.1 Authentication Type: Pre-Shared Key Pre-Shared Key: Test!1234 Local ID: IP Address Peer ID: IP Address |
|
FW_B |
Interface: GigabitEthernet 0/0/1 IP address: 1.1.5.1/24 Security zone: Untrust |
Interface: GigabitEthernet 0/0/3 IP address: 10.1.2.1/24 Security zone: Trust |
|
IPSec configuration Scenario: Site-to-site Peer IP Address: 1.1.3.1 Authentication Type: Pre-Shared Key Pre-Shared Key: Test!1234 Local ID: IP Address Peer ID: IP Address |
The procedure and roadmap for configuring FW_A and FW_B are similar:
Access a host or server on the headquarters network from a host on the branch network. The access succeeds.
On FW_A, choose to display the established tunnels.
Policy Name |
Status |
Local Address |
Peer Address |
|---|---|---|---|
policy_1 |
IKE and IPSec negotiations succeed. |
1.1.3.1 |
1.1.5.1 |
On FW_B, choose to display the established tunnels.
Policy Name |
Status |
Local Address |
Peer Address |
|---|---|---|---|
policy_1 |
IKE and IPSec negotiations succeed. |
1.1.5.1 |
1.1.3.1 |
# acl number 3000 rule permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.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 ike6117323732 pre-shared-key %$%$c([VET@941t/q_4tS-f7,ri/%$%$ ike-proposal 1 remote-id-type ip remote-address 1.1.5.1 # ipsec proposal prop6117323732 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy ipsec6117323788 1 isakmp security acl 3000 ike-peer ike6117323732 proposal prop6117323732 tunnel local 1.1.3.1 # 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 ipsec6117323788 # 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 1.1.5.0 255.255.255.0 1.1.3.2 ip route-static 10.1.2.0 255.255.255.0 1.1.3.2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.1.0 24 destination-address 10.1.2.0 24 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.2.0 24 destination-address 10.1.1.0 24 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local source-address 1.1.5.1 32 destination-address 1.1.3.1 32 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.3.1 32 destination-address 1.1.5.1 32 action permit
# acl number 3000 rule 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 ike6117323732 pre-shared-key %$%$pFR^=%xE/P^}NS*sN5e(,wne%$%$ ike-proposal 1 remote-address 1.1.3.1 # ipsec proposal prop6117323732 esp authentication-algorithm sha2-256 esp encryption-algorithm aes-256 # ipsec policy ipsec6117323788 1 isakmp security acl 3000 ike-peer ike6117323732 proposal prop6117323732 tunnel local 1.1.5.1 # 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 ipsec6117323788 # 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 1.1.3.0 255.255.255.0 1.1.5.2 ip route-static 10.1.1.0 255.255.255.0 1.1.5.2 # security-policy rule name policy_ipsec_1 source-zone trust destination-zone untrust source-address 10.1.2.0 24 destination-address 10.1.1.0 24 action permit rule name policy_ipsec_2 source-zone untrust destination-zone trust source-address 10.1.1.0 24 destination-address 10.1.2.0 24 action permit rule name policy_ipsec_3 source-zone untrust destination-zone local source-address 1.1.3.1 32 destination-address 1.1.5.1 32 action permit rule name policy_ipsec_4 source-zone local destination-zone untrust source-address 1.1.5.1 32 destination-address 1.1.3.1 32 action permit