Skip to main content
ychia
Staff
Staff
Oct 14, 2026 8:59 AM UTC

Technical Tip: Certificate-based IPsec VPN fails after migration due to an incorrect CA reference

Description

This article describes how to troubleshoot certificate-based IPsec VPN tunnels that fail after migrating from a physical FortiGate to a FortiGate VM when the configured peer CA object references a different CA certificate on the destination device.

Scope

FortiGate.

Solution

After migration, two certificate-based IPsec tunnels failed to establish. The local certificate was valid, and its private key matched. However, the destination FortiGate rejected the remote peer certificate during IKE authentication.


  1. Review the IPsec Phase 1 configuration.

  2. Verify the local certificate and private key.

get vpn certificate local details <Certificate_Name> 
execute vpn certificate local verify <Certificate_Name>


  1. Collect IKE debug during a failed negotiation.

diagnose debug reset
diagnose vpn ike log filter name <Tunnel_Name>
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug enable


Trigger tunnel negotiation, then stop debugging:

diagnose debug disable


Relevant IKE debug:

2026-10-12 01:52:45.443422 ike V=VDOM-VPN:2:Tunnel_Name:3725870: initiator received AUTH msg
2026-10-12 01:52:45.443464 ike V=VDOM-VPN:2:Tunnel_Name:3725870: received peer identifier DER_ASN1_DN 'C = DE, L = Default City, O = sainsburys.co.uk, CN = vpn.transact-gmbh.de'
2026-10-12 01:52:45.443478 ike V=VDOM-VPN:2:Tunnel_Name:3725870: Validating X.509 certificate
2026-10-12 01:52:45.443558 ike V=VDOM-VPN:2:Tunnel_Name:3725870: peer cert, subject='vpn.transact-gmbh.de', issuer='Euronet Worldwide Production Systems CA SV1P'
2026-10-12 01:52:45.443572 ike V=VDOM-VPN:2:Tunnel_Name:3725870: peer ID verified
2026-10-12 01:52:45.443591 ike V=VDOM-VPN:2:Tunnel_Name:3725870: FNBAM_GROUP_NAME candidate 'PeerName'
2026-10-12 01:52:45.443618 ike V=VDOM-VPN:2:Tunnel_Name:3725870: certificate validation pending
2026-10-12 01:52:45.444096 ike V=VDOM-VPN:2:Tunnel_Name:3725870: fnbam cert group matching failed
2026-10-12 01:52:45.444112 ike V=VDOM-VPN:2:Tunnel_Name:3725870: certificate validation failed
2026-10-12 01:52:45.444201 ike V=VDOM-VPN:2:Tunnel_Name:3725870: authentication faile


The exchange reached IKE_AUTH, and the VM identified the remote certificate issuer as Euronet. The failure occurred during certificate validation and matching against PeerName.

  1. Check the CA referenced by the peer object.

config user peer
    edit "PeerName"
        set ca "G_CA_Cert_3"
end


Check the actual certificate associated with this object on both devices:

get vpn certificate ca details G_CA_Cert_3


On the destination VM, the output identified a Sectigo CA:

Name:
G_CA_Cert_3

Subject:
C = GB, O = Sectigo Limited,
CN = Sectigo Public Server Authentication CA OV R36

Issuer:
C = GB, O = Sectigo Limited,
CN = Sectigo Public Server Authentication Root R46


The old FortiGate’s G_CA_Cert_3 instead contained:

DC=com, DC=eeft, DC=pr,
CN=Euronet Worldwide Production Systems CA SV1P


Although the CA object name was identical, its certificate differed between devices. The migrated EPAY object therefore referenced the wrong CA for the remote certificate.

  1. Update the peer to reference the correct CA.

config user peer
    edit "PeerName"
        set ca "<verified_Euronet_CA_object_name>"
end


Replace the placeholder with the actual CA object name on the destination device. Configure set ca under config user peer, not under config vpn ipsec phase1-interface.

  1. Verify the resolution.

Verify tunnel status and traffic.

 

Note: CA object names such as G_CA_Cert_1 and G_CA_Cert_3 do not identify the certificate’s issuer or trust hierarchy. During migration, verify the certificate subject and fingerprint behind each referenced object.

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024