Home / Notes / Huawei–FortiGate IPSec Tunnel
NOTES · IPSEC / FORTINET INTEROP

Huawei AR Router to Fortinet FortiGate IPSec Tunnel: Interop Configuration Guide

A Huawei AR-series branch router building an ACL-based IPSec tunnel to a Fortinet FortiGate firewall at headquarters — how the two vendors' terminology for IKE version, cipher suite, PFS and lifetime lines up, the configuration on each side, and 5 interop gotchas.

By the AtlasCommTech engineering team — 13 years of carrier & enterprise network deployments · Updated July 2026

Two Different Configuration Languages, One IPSec Standard

A Huawei command line and a FortiGate wizard describe the same phase 1 / phase 2 negotiation — the trick is knowing which field means which.

IPSec itself is a vendor-neutral IETF standard, but every vendor names its knobs differently and defaults them differently. Pairing a Huawei AR router at a branch with a Fortinet FortiGate firewall at headquarters means the same tunnel has to be described once in Huawei CLI and once in FortiGate's web GUI — and the two configuration surfaces don't use the same words for the same thing.

Below is the configuration this note is based on: a Huawei branch router using ACL-based IPSec (not a Tunnel interface — see our separate VTI note for that variant), a FortiGate headquarters firewall configured through its GUI, a terminology alignment table so the same parameter doesn't get set twice with two different names, and the 5 interop issues that show up most often on this exact pairing.

Topology and Data Plan

An ACL on the Huawei router defines the protected traffic; a FortiGate custom IPSec tunnel mirrors it as Phase 2 Selectors.

RouterHuawei branch gateway FWFortinet FortiGate HQ firewall Internet 1.1.1.1 2.1.1.1 IPSec Tunnel · ACL 3101 ↔ Phase 2 Selectors GigabitEthernet0/0/1 wan1 Branch private subnet10.1.1.0/24 HQ private subnet10.1.2.0/24

Diagram labels are kept in English for engineering clarity.

Addressing

ItemRouter — Huawei branch gatewayFW — Fortinet HQ gateway
Public (WAN) address1.1.1.12.1.1.1
Private subnet gateway10.1.1.210.1.2.1

This is the addressing published in the source configuration guide's own data-plan table. If a static route or ACL entry you copy from a guide references a different subnet than the one in its own data-plan table, treat that as a documentation slip to verify, not a value to trust blindly — see Gotcha 5 below.

Phase 1 — IKE Negotiation Parameters

ParameterValue (this example)
IKE versionIKEv1
Negotiation modeMain mode
Authentication methodPre-shared key
Pre-shared key (this example)huawei@123the source example's key; always set a unique key of your own.
Encryption algorithmaes-cbc-256
Authentication algorithmsha2-512
DH groupgroup14
IKE SA lifetime28800 seconds
DPDEnabled

Phase 2 — IPSec Negotiation Parameters

ParameterValue (this example)
Security protocolESP
Encapsulation modeTunnel
Encryption algorithmaes-256
Authentication algorithmsha2-512
IPSec SA lifetime3600 seconds
PFSDisabled

Cross-Vendor Terminology Alignment

Same field, different name — and, for lifetime, different default units engineers assume without checking.

Huawei CLI termWhat it controlsFortiGate GUI equivalent
ike proposal (encryption-algorithm / authentication-algorithm / dh)Phase-1 (IKE SA) cipher suite and DH groupPhase 1 Proposal — Algorithms combo, DH Group
ike-proposal sa durationPhase-1 (IKE SA) lifetimePhase 1 Proposal — Key Lifetime (seconds)
ipsec proposal (esp authentication-algorithm / esp encryption-algorithm)Phase-2 (IPSec SA) cipher suitePhase 2 Proposal — Encryption / Authentication
ipsec policy ... sa duration time-basedPhase-2 (IPSec SA) lifetimePhase 2 Proposal — Key Lifetime, seconds/KBytes/Both
dpd type / dpd msgDead Peer Detection behavior and packet formatDead Peer Detection — On Idle / On Demand, under Phase 1
acl number (advanced ACL, permit rule)Which traffic is "interesting" and gets protectedPhase 2 Selectors — local/remote address
ike peer ... v1IKE protocol version used to negotiateNetwork / IKE section — IKE Version field (1 or 2)

FortiGate menu names shown here follow the GUI walkthrough in the Huawei configuration guide this note is based on — "Authentication", "IKE", "Phase 1 Proposal" and "Phase 2 Selectors / Phase 2 Proposal" screens under VPN > IPSec > Tunnels. Exact wording can shift slightly between FortiOS versions.

Configuration Highlights — Huawei Side

Six steps, ACL-driven: define the interesting traffic first, then wrap it in an IPSec policy.

  1. Configure interface IP addresses and a static route so both sides' public-network paths are reachable.
  2. Configure an ACL defining the traffic from the branch private subnet to the headquarters private subnet that needs IPSec protection.
  3. Define an IPSec proposal (ESP, tunnel mode, encryption, authentication) — and enable SHA-2 compatibility mode up front, since this example already runs SHA2-512.
  4. Define an IKE proposal and an IKE peer with the phase-1 attributes: encryption, authentication, DH group, SA duration, pre-shared key, main mode and DPD.
  5. Define an IPSec policy that references the ACL, the IPSec proposal and the IKE peer — this is the object that ties "what traffic" to "how it's protected".
  6. Apply the IPSec policy group to the public-facing interface so it actually gets IPSec protection.
<Huawei> system-view
[Huawei] sysname Router
[Router] interface gigabitethernet 0/0/1
[Router-GigabitEthernet0/0/1] ip address 1.1.1.1 255.255.255.0
[Router-GigabitEthernet0/0/1] quit
[Router] interface gigabitethernet 0/0/2
[Router-GigabitEthernet0/0/2] ip address 10.1.1.1 255.255.255.0
[Router-GigabitEthernet0/0/2] quit
[Router] ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
[Router] ip route-static 10.2.1.0 255.255.255.0 1.1.1.2

[Router] acl number 3101
[Router-acl-adv-3101] rule permit ip source 10.1.1.0 0.0.0.255 destination 10.2.1.0 0.0.0.255
[Router-acl-adv-3101] quit

[Router] ipsec authentication sha2 compatible enable
[Router] ipsec proposal tran1
[Router-ipsec-proposal-tran1] transform esp
[Router-ipsec-proposal-tran1] esp authentication-algorithm sha2-512
[Router-ipsec-proposal-tran1] esp encryption-algorithm aes-256
[Router-ipsec-proposal-tran1] encapsulation-mode tunnel

[Router] ike proposal 5
[Router-ike-proposal-5] encryption-algorithm aes-cbc-256
[Router-ike-proposal-5] authentication-algorithm sha2-512
[Router-ike-proposal-5] dh group14
[Router-ike-proposal-5] sa duration 28800
[Router-ike-proposal-5] authentication-method pre-share
[Router-ike-proposal-5] quit

[Router] ike peer feita v1
[Router-ike-peer-feita] ike-proposal 5
[Router-ike-peer-feita] pre-shared-key cipher huawei@123
[Router-ike-peer-feita] remote-address 2.1.1.1
[Router-ike-peer-feita] exchange-mode main
[Router-ike-peer-feita] dpd type periodic
[Router-ike-peer-feita] dpd msg seq-hash-notify
[Router-ike-peer-feita] quit

[Router] ipsec policy map1 10 isakmp
[Router-ipsec-policy-isakmp-map1-10] ike-peer feita
[Router-ipsec-policy-isakmp-map1-10] proposal tran1
[Router-ipsec-policy-isakmp-map1-10] security acl 3101
[Router-ipsec-policy-isakmp-map1-10] sa duration time-based 3600
[Router-ipsec-policy-isakmp-map1-10] quit

[Router] interface gigabitethernet 0/0/1
[Router-GigabitEthernet0/0/1] ipsec policy map1
[Router-GigabitEthernet0/0/1] quit

Checking the result on the Huawei side after applying:

[Router] display ike proposal number 5
-------------------------------------------
 IKE Proposal: 5
   Authentication method      : pre-shared
   Authentication algorithm   : SHA2-512
   Encryption algorithm       : AES-CBC-256
   DH group                   : MODP-2048
   SA duration                : 28800
   PRF                        : PRF-HMAC-SHA2-256
-------------------------------------------
[Router] display ipsec proposal
Number of proposals: 1
IPsec proposal name: tran1
 Encapsulation mode: Tunnel
 Transform         : esp-new
 ESP protocol      : Authentication SHA2-HMAC-512
                     Encryption     AES-256

What This Looks Like on the FortiGate Side

FortiGate is configured through its web GUI here rather than the CLI — the source guide this note is based on walks through the wizard screens, not command syntax.

  1. Log into the FortiGate web GUI with your admin credentials.
  2. Under System > Network > Interfaces, set the public-facing interface (wan1 in this example) and the private-facing interface (port1) IP addresses.
  3. Under Router > Static > Static Routes, create the public-network route and the private-network route toward the branch.
  4. Under VPN > IPSec > Tunnels, create a new tunnel, give it a name, and choose Custom (no template) rather than one of the wizard's pre-built templates.
  5. In the Network section, set the local/remote IP addresses and the outbound interface for the tunnel.
  6. In the Authentication section, enter the pre-shared key; in the IKE section, set the IKE version and negotiation mode to match the Huawei side (IKEv1, main mode).
  7. In Phase 1 Proposal, set the same encryption/authentication combination, DH group and key lifetime as the Huawei ike proposal (AES-256/SHA2-512, DH group 14, 28800 seconds).
  8. In Phase 2 Selectors, define the local subnet (headquarters) and remote subnet (branch) — the mirror image of the Huawei ACL. In Phase 2 Proposal, set the same encryption/authentication and lifetime as the Huawei ipsec proposal (AES-256/SHA2-512, 3600 seconds, PFS off).
  9. Save the tunnel configuration.

Menu names and screen layout can vary between FortiOS releases; the sequence of concepts — Network, Authentication, IKE, Phase 1 Proposal, Phase 2 Selectors, Phase 2 Proposal — stays the same across recent versions.

5 Interop Gotchas

These account for most of the tunnels that build fine and still don't pass the traffic they're supposed to.

1. DPD Packet Format Doesn't Match Between Vendors

SYMPTOMDead Peer Detection is enabled, and the tunnel behaves unpredictably instead of cleanly detecting a dead peer.

CAUSEFortinet's default DPD packet format is not the same as the Huawei router's default. Left on its default, the Huawei side isn't actually speaking the same DPD dialect as the FortiGate side.

FIXOn the Huawei router, set the DPD message format to seq-hash-notify so it matches what the FortiGate side expects.

[Router-ike-peer-feita] dpd type periodic
[Router-ike-peer-feita] dpd msg seq-hash-notify

2. SHA2-512 on Both Ends — Enable Compatibility Before It Breaks, Not After

SYMPTOMWithout the fix below, this exact pairing would show phase 1 and phase 2 as established, then fail to pass traffic, or pass only part of it — the classic "tunnel is up, data isn't" symptom.

CAUSEWhen the Huawei router and the other vendor's device both use a SHA-2 algorithm in the IPSec security proposal — SHA2-512 in this example — their SHA-2 encryption/decryption implementations can differ just enough that the tunnel negotiates fine but the data plane doesn't.

FIXEnable SHA-2 compatibility mode on the Huawei router as a standard step whenever SHA-2 is in the proposal, rather than waiting for a broken-traffic report.

[Router] ipsec authentication sha2 compatible enable

3. ACL and Phase 2 Selectors Must Mirror Each Other, Exactly

SYMPTOMPhase 1 (IKE) establishes cleanly, but phase 2 (quick mode / IPSec SA) never comes up, or comes up and drops repeatedly.

CAUSEThe Huawei ACL defines protected traffic as source 10.1.1.0/24 to destination 10.2.1.0/24; the FortiGate Phase 2 Selectors must define the exact mirror image — local 10.2.1.0/24 (or whatever the actual HQ subnet is), remote 10.1.1.0/24. If the two traffic selectors are not reverse-symmetric, phase 2 proposal matching fails even though phase 1 succeeded.

FIXCheck both sides' traffic selectors side by side before troubleshooting anything else in phase 2 — a mismatch here is far more common than a cipher mismatch.

4. IKE Version Assumption Doesn't Hold on Huawei's Default

SYMPTOMThe peer was configured expecting IKEv1 specifically, but negotiation behaves like IKEv2 is in play, or the two ends fail to agree on a version.

CAUSEBy default, a Huawei IKE peer has both IKEv1 and IKEv2 enabled. When it initiates negotiation it uses IKEv2; when it responds, it supports both. Needing IKEv1 specifically — as this example does, matching the FortiGate side's IKE Version field set to 1 — has to be configured explicitly.

FIXConfigure the peer for v1 explicitly, and confirm the FortiGate IKE Version field is also set to 1, not 2.

[Router] ike peer feita v1

5. Don't Trust Addressing Copied From an Old Example

SYMPTOMA static route or ACL rule copied from a configuration guide references a subnet that doesn't match the guide's own addressing table for the same scenario.

CAUSEConfiguration guides are frequently built by adapting a previous worked example. A route or rule can end up still pointing at a subnet used in an earlier, different example instead of the one the current data-plan table actually documents.

FIXRe-derive every address in a copied ACL or static route from your own network's addressing plan before applying it — never assume a worked example's own internal consistency.

Related solution designs

How to Confirm It's Actually Working

"Established" in the SA table is necessary but not sufficient — check the packet counters too.

  1. On the Huawei router, run display ike sa. Both phase 1 and phase 2 security associations should show as established — Huawei marks a healthy SA RD|ST (ready, stay-alive).
  2. On the FortiGate GUI, check the tunnel's status under Monitor > IPsec Monitor — it should show Up for both phases.
  3. From a branch host, ping a headquarters host across the tunnel, then run display ipsec statistics esp on the Huawei router. The Inpacket decap count and Outpacket encap count fields should be non-zero — that confirms traffic is actually being encrypted and decrypted, not just that the SA exists.
[Router] display ike sa
      Conn-ID      Peer           VPN    Flag(s)     Phase
  ---------------------------------------------------------
       16          2.1.1.1         0     RD|ST         2
       14          2.1.1.1         0     RD|ST         1
  Flag Description:
  RD--READY   ST--STAYALIVE   RL--REPLACED   FD--FADING   TO--TIMEOUT
  HRT--HEARTBEAT   LKG--LAST KNOWN GOOD SEQ NO.   BCK--BACKED UP

If the tunnel won't establish at all, the first two things to check are always the same: is the underlying route to the peer's public address actually reachable, and do both ends' configurations genuinely match, parameter for parameter — including the ACL/Phase 2 Selectors mirror described in Gotcha 3.

FAQ

Questions this exact Huawei-Fortinet pairing comes up with most.

Does the Huawei router need to use ACL-based IPSec against a FortiGate, or can it use a VTI?

Either can work in principle, but the worked example this note is based on uses ACL-based IPSec on the Huawei side, matching a FortiGate custom IPSec tunnel with defined Phase 2 Selectors on the GUI side. If you want the Tunnel-interface (VTI) approach instead, see our separate Huawei-to-Cisco VTI note for the logic — the same routing-driven reasoning applies against a FortiGate that supports route-based VPN.

Why does the Huawei configuration enable SHA-2 compatibility mode before any problem shows up?

Because this example already runs SHA2-512 on both IKE and IPSec proposals. SHA-2 compatibility between vendors is exactly the kind of thing that builds a tunnel fine but breaks the data plane silently, so enabling it upfront — rather than waiting for a broken-traffic ticket — is the safer default whenever both ends negotiate a SHA-2 algorithm.

What is the FortiGate equivalent of a Huawei ike proposal and ipsec proposal?

On the FortiGate GUI, Phase 1 Proposal covers the same ground as a Huawei ike proposal — encryption, authentication, DH group and key lifetime for the IKE SA. Phase 2 Proposal covers the same ground as a Huawei ipsec proposal — encryption, authentication and lifetime for the IPSec SA. Phase 2 Selectors is the FortiGate equivalent of the ACL that defines protected traffic on the Huawei side.

Do the ACLs on each side need to mirror each other exactly?

Yes, in reverse. The Huawei ACL permits traffic from the branch subnet to the headquarters subnet; the FortiGate Phase 2 Selectors must define the mirror image — headquarters subnet as local, branch subnet as remote. If either side's traffic selector does not match its peer's in reverse, phase 2 negotiation fails even though phase 1 succeeded.

Should I copy the addressing straight out of a vendor configuration guide?

Copy the command syntax, not the addressing. Configuration guides are frequently adapted from other worked examples, and a static route or subnet reference can end up pointing at an address left over from a previous example instead of the one actually in use. Always re-derive the addressing from your own network before applying a copied configuration.

Honest Limits of This Note

Honest Limits of This Note

This note is based on one worked configuration: a Huawei router (IKEv1, main mode, pre-shared key, AES-256 / SHA2-512, ACL-based) reaching a Fortinet FortiGate firewall. FortiOS menu wording shifts slightly between versions; IKEv2, VTI/route-based VPN on the FortiGate side, NAT traversal, and a dynamic-IP branch each shift the details further. This note covers the ACL-based method against Fortinet, not every combination.

Send us your exact combination

Device models, FortiOS version and the cipher suite you're trying to run — send it over WhatsApp and we'll help you line up the parameters on both ends.

WhatsApp an engineer →

Related Reading