CASTCUBE/Guides
Connecting FortiGate, Juniper SRX and Cisco with Site-to-Site IPsec VPN: Real Cases and the Settings That Must Match
Headquarters runs a FortiGate. A branch has a Juniper device that was bought years ago and never put into service. A newly leased office came with Cisco equipment the previous tenant left behind. That is a real customer situation we handled. The short answer: a site-to-site VPN between headquarters and branches works even when the firewall vendors are different. This guide covers what has to match on both sides, where mixed-vendor tunnels usually fail, and whether old equipment is safe to reuse.
Can VPN devices from different vendors connect to each other?
Yes. Site-to-site VPNs between offices almost always use IPsec, an open standard. FortiGate, Juniper SRX, Cisco (ISR routers and ASA), SonicWall and Palo Alto all support IPsec, so once both devices are configured with the same values, the tunnel comes up. The hard part is that each vendor uses different menu names and different defaults, so getting “the same values” on both sides is where the time goes.
Which values must match on both sides?
| Setting | Recommended example | Notes |
|---|---|---|
| IKE version | IKEv2 | If an old device or firmware does not support IKEv2, set both sides to IKEv1. |
| Phase 1 encryption / integrity | AES-256 / SHA-256 | Avoid SHA-1 and 3DES where possible; they are outdated. |
| DH group | 14 (or 19/20) | Must be the same number on both sides. |
| Authentication | Pre-shared key (PSK) | Use a long random string, and do not send it over chat. |
| Phase 1 lifetime | 28800 seconds (8 hours) | A mismatch may still negotiate, but it causes drops at rekey. |
| Phase 2 encryption / integrity | AES-256 / SHA-256 | |
| PFS | Enabled, DH 14 | If PFS is on at only one end, Phase 2 will not come up. |
| Phase 2 lifetime | 3600 seconds (1 hour) | |
| Protected subnets | HQ 10.10.0.0/16 ↔ branch 10.20.0.0/24 | Each vendor names this differently: Phase 2 selectors (FortiGate), proxy-identity (Juniper), crypto ACL (Cisco). |
| DPD | Enabled | Detects a dead peer and re-establishes the tunnel. |
Where do mixed-vendor tunnels usually fail?
- Phase 1 is up but Phase 2 will not come up — usually the protected subnets differ between the two sides. For example, the FortiGate selector is left at 0.0.0.0/0 while the Cisco ASA crypto ACL lists specific subnets. Set both sides to the same subnets, or make both sides route-based.
- PFS or DH group mismatch — the PFS row in the table above. “No proposal chosen” in the logs means the encryption proposals do not match.
- Overlapping internal subnets — if both offices use 192.168.1.0/24, the tunnel may come up but traffic will not flow. Renumber the branch or use NAT. The cleanest fix is to plan subnets before a new branch opens.
- Tunnel is up but ping fails — a missing route or firewall policy. Add a route to the remote subnet via the tunnel and open policies in both directions.
- One device is behind NAT — if the ISP modem is in router mode, the VPN device gets a private IP. Put the modem in bridge mode or assign the static IP directly to the VPN device. If that is not possible, use NAT-T (UDP 4500) and match the local ID on both sides.
Where to configure and verify on each device
FortiGate
Go to VPN → IPsec Tunnels → Create New → Custom and enter Phase 1 and Phase 2 values from the table. Then add a static route to the remote subnet via the tunnel interface, and firewall policies in both directions. Check status in the IPsec dashboard widget or from the CLI:
diagnose vpn ike gateway list
diagnose vpn tunnel list
get vpn ipsec tunnel summary
Juniper SRX
A route-based configuration (st0 interface) is the easiest to match with a FortiGate. Below is a basic skeleton for a branch SRX pointing at a headquarters FortiGate. Change interface names and IPs to fit the site.
set security ike proposal HQ-P1 authentication-method pre-shared-keys
set security ike proposal HQ-P1 dh-group group14
set security ike proposal HQ-P1 authentication-algorithm sha-256
set security ike proposal HQ-P1 encryption-algorithm aes-256-cbc
set security ike proposal HQ-P1 lifetime-seconds 28800
set security ike policy HQ-POL proposals HQ-P1
set security ike policy HQ-POL pre-shared-key ascii-text "YOUR-PRE-SHARED-KEY"
set security ike gateway HQ-GW ike-policy HQ-POL
set security ike gateway HQ-GW address HQ-PUBLIC-IP
set security ike gateway HQ-GW external-interface ge-0/0/0.0
set security ike gateway HQ-GW version v2-only
set security ipsec proposal HQ-P2 protocol esp
set security ipsec proposal HQ-P2 authentication-algorithm hmac-sha-256-128
set security ipsec proposal HQ-P2 encryption-algorithm aes-256-cbc
set security ipsec proposal HQ-P2 lifetime-seconds 3600
set security ipsec policy HQ-IPSEC perfect-forward-secrecy keys group14
set security ipsec policy HQ-IPSEC proposals HQ-P2
set security ipsec vpn HQ-VPN bind-interface st0.0
set security ipsec vpn HQ-VPN ike gateway HQ-GW
set security ipsec vpn HQ-VPN ike ipsec-policy HQ-IPSEC
set security ipsec vpn HQ-VPN establish-tunnels immediately
set interfaces st0 unit 0 family inet
set security zones security-zone vpn interfaces st0.0
set routing-options static route 10.10.0.0/16 next-hop st0.0
Allow IKE on the zone that holds the external interface (host-inbound-traffic system-services ike), and open policies in both directions between the internal zone and the vpn zone, or no traffic will pass. Verify with:
show security ike security-associations
show security ipsec security-associations
Cisco (ISR router · ASA)
Cisco differs by platform. On ISR-class routers, a virtual tunnel interface (VTI) is route-based and easy to match with FortiGate and Juniper. The crypto map method on ASA and older routers is policy-based, so the subnets in the crypto ACL must match the remote device’s Phase 2 subnets exactly.
show crypto ikev2 sa (for IKEv1: show crypto isakmp sa)
show crypto ipsec sa
Is it safe to reuse old equipment, or gear a previous tenant left behind?
If it checks out, yes. A customer once moved into a Michigan office where the previous tenant had left old Cisco equipment. We checked the models and condition from photos first, decided it was usable, and an engineer installed it on site. Our checklist:
- End of support (EoS/EoL) — a device that no longer receives security updates should not be the internet-facing VPN device.
- Supported crypto — confirm it can do IKEv2, AES-256, SHA-256 and DH group 14 or higher.
- Throughput — if the circuit is fast but the device’s VPN throughput is low, the device becomes the bottleneck.
- Licenses and admin access — some models need a feature license, and the admin password for a previous tenant’s device is usually unknown, so a factory reset is needed.
The headquarters FortiGate and the unused branch Juniper were handled the same way: instead of buying a new VPN device, we reconfigured the existing Juniper and connected it to headquarters over IPsec.
What to set up after the VPN is connected
- Circuit failure — a VPN runs over the internet, so when the line goes down, the VPN goes down with it. The same customer had a branch whose internet dropped often; after we added a backup line, that office stayed connected even when the whole building lost internet.
- Monitoring — set alerts so you know a tunnel is down before staff notice.
- Config backups and documentation — keep both device configs, the subnet plan and where the pre-shared key is stored, in writing.
What to have ready before you contact us
- Model names of the VPN devices at headquarters and the branch (photos are fine)
- Public IPs on both sides and whether they are static
- Internal subnets on both sides (e.g. 192.168.10.0/24)
- Contact for the head office IT person, if the headquarters side also needs changes
CASTCUBE engineers travel to branches in any US state to install VPN devices and firewalls, reuse existing equipment where it is still good, and take on monitoring and outage response after the install. Network, VPN and cabling installs · Contact us