Created on
09-08-2024
08:46 PM
Edited on
09-10-2025
05:47 AM
By
Jean-Philippe_P
Description |
This article describes how to solve the authentication problem 'gw validation failed' using IPsec Dial-up IKEv2. |
Scope | FortiGate. |
Solution |
When IPsec Dial-up is configured with IKEv2, the following errors may be displayed in the following debug outputs when attempting to connect to VPN. diagnose vpn ike log-filter src-addr4 x.x.x.x <----- Public IP address of the user attempting to connect to VPN. diagnose debug enable . ike 0:REMOTE:77: peer identifier IPV4_ADDR x.x.x.x
ike 0:REMOTE: connection expiring due to phase1 down
Note: Starting from v7.4.1, the 'diagnose vpn ike log-filter src-addr4 <IP>' command has been changed to 'diagnose vpn ike log filter loc-addr4 <IP>'.
To display the list of filters, use a '?' after 'filter'. diagnose vpn ike log filter ? loc-addr4: IPv4 local gateway address range to filter by.
Use case 1:
FortiGate-Fw # config vpn ipsec phase1-interface
As an alternative, EAP may be enabled, but the 'authusrgrp' setting is left blank, and a group is set in at least one firewall policy that uses the phase1-interface as source. This acts the same as the 'Inherit from policy' setting in IKEv1. For more details on IPsec and Authentication, refer to Technical Tip: A guide to Dial-Up IPsec VPN Authentication and Policy Matching.
Note:
Update:
Related document: Autoconnect to IPsec VPN using Entra ID logon session information
FortiGate-Fw # config vpn ipsec phase1-interface FortiGate-Fw (IPSec_Auto_Connect) # set eap disable FortiGate-Fw (IPSec_Auto_Connect) # end
It also provides the debug commands to troubleshoot the issues with dial-up VPN and EAP together.
FortiGate-Fw # config vpn ipsec phase1-interface ike 0:IPsecVPN_saml:381: received FCT-UID = B041A92A44754A61BE5F6A8B2B64E2 To resolve this issue, configure the Local ID on FortiClient to match the Peer ID set on FortiGate in the IPsec Phase 1 configuration:
Note: The error may also occur when local ID is set on the FortiClient end and FortiGate is configured to default (Peer ID type is 'Any').
ike 0:IPsecVPN_saml:saml_contractor:2037: received EMS tenant ID :
FortiGate-Fw # config vpn ipsec phase1-interface
Note: IKEv2:
Use case 3: When the local gateway is defined and the interface has a dynamic IP address assigned (DHCP or PPPoE), it will be necessary to disable it due to the IP address change. There is a reference in the note about this behavior.
Note: IPv4 address is not supported for a Peer ID setup for IPsec VPN tunnels.
Refer to the following articles for more information: Troubleshooting Tip: The IPv4 address is not supported for Peer ID for IPsec vpn tunnels |
Great input thank you @vbarrios
Well done @vbarrios !!!
Great article , really helps.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.