Created on
12-26-2022
11:12 PM
Edited on
01-03-2025
12:12 AM
By
Jean-Philippe_P
| Description |
This article describes how to block unwanted IKE packets successfully using local-in-policy.
Generally, local-in-policy is used to block any unwanted packet before a further inspection by the FortiGate on the CPU, therefore one of the advantages of local-in-policy is to reduce the workload on the CPU. |
| Scope | FortiGate. |
| Solution |
It is possible to configure local-in-policy to block IKE packet but it is still possible to observe an ongoing IKE negotiation, therefore it can be seen in VPN logs the error message 'peer SA proposal not match local policy' or 'no SA proposal chosen' in IKE debugging output.
date=2022-12-26 time=18:54:26 eventtime=1672077267522086486 tz="+0100" logid="0101037124" type="event" subtype="vpn" level="error"
Note: It is also possible to see in VPN logs the error message 'Invalid ESP packet detected'.
Solution:
FGT # show firewall local-in-policy
Note: Starting from FortiGate v7.6.0, the Local-in-Policy can now be also configured in the GUI. Refer to this document for reference: Technical Tip: Creating a Local-In policy (IPv4 and IPv6) on GUI.
Make sure there is no session entry in the session table for remote IP with destination port number 500 after local-in-policy has been configured:
di sys session filter clear
Note: After clearing the session entry, check the session table again to make sure it has successfully removed the session entry for that remote IP with port number 500.
Related documents: |
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 2026 Fortinet, Inc. All Rights Reserved.