Configuring an IPSec Site‑to‑Site VPN Between Headquarters and Branch NAT Devices
This guide demonstrates how to configure routers, firewalls, NAT, and IPSec policies to establish a site‑to‑site VPN between a headquarters and branch office when both use NAT devices, enabling mutual access and internet connectivity.
This experiment shows how to set up an IPSec tunnel between a headquarters and a branch office when both sites use NAT devices as their export gateways, allowing mutual communication and internet access.
1. Router configuration (routing between FW1 and FW2)
interface GigabitEthernet0/0/0ip address 220.163.100.1 255.255.255.0#interface GigabitEthernet0/0/1ip address 220.163.200.1 255.255.255.0#2. FW1 configuration
a) Interface IP addresses
interface GigabitEthernet0/0/0ip address 192.168.10.1 255.255.255.0#interface GigabitEthernet0/0/1ip address 220.163.100.2 255.255.255.0b) Assign interfaces to zones
firewall zone trustadd interface GigabitEthernet0/0/0#firewall zone untrustadd interface GigabitEthernet0/0/1c) Enable inter‑zone packet filtering (permit all for the lab) firewall packet-filter default permit all d) Static default route ip route-static 0.0.0.0 0.0.0.0 220.163.100.1 e) Define protected traffic
acl number 3000rule 5 permit ip source 192.168.10.0 0.0.0.255 destination 192.168.20.0 0.0.0.255f) IPSec proposal “tran1”
ipsec proposal tran1esp authentication-algorithm sha1esp encryption-algorithm aesg) IKE proposal “10”
ike proposal 10authentication-method pre-shareauthentication-algorithm sha1h) IKE peer configuration
ike peer cpre-shared-key 123456ike-proposal 10remote-address 220.163.200.2i) IPSec policy map1
ipsec policy map1 10 isakmpsecurity acl 3000ike-peer cproposal tran1j) Apply IPSec policy to the external interface
interface GigabitEthernet0/0/1ip address 220.163.100.2 255.255.255.0ipsec policy map1k) NAT policy (exclude IPSec‑protected flow, then source‑nat the rest)
nat-policy interzone trust untrust outboundpolicy 1action no-natpolicy source 192.168.10.0 0.0.0.255policy destination 192.168.20.0 0.0.0.255policy 2action source-nateasy-ip GigabitEthernet0/0/13. FW2 configuration (mirrors FW1 with opposite subnets)
a) Interface IP addresses
interface GigabitEthernet0/0/0ip address 192.168.20.1 255.255.255.0#interface GigabitEthernet0/0/1ip address 220.163.200.2 255.255.255.0b) Zones, packet filter, static route, ACL, IPSec/IKE proposals, IKE peer, IPSec policy, and NAT are configured analogously to FW1, using the 192.168.20.0/24 network and the opposite public IPs (220.163.200.1/2).
4. Verification
On FW1 and FW2 the IKE SA tables show two tunnels (IDs 1 and 40001) in READY state. The IPSec SA tables display tunnel mode “map1”, correct local/remote tunnel IPs, and matching inbound/outbound ESP SAs. Ping tests from PCs in both subnets succeed with 0 % packet loss, confirming end‑to‑end connectivity.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
