Skip to main content
barisben
New Member
July 16, 2026
Question

FortiGate Self-Originated IKE Traffic Bypasses Local-In-Policy Drop on Dial-Up VPN

  • July 16, 2026
  • 4 replies
  • 54 views

Hello,

I am facing a persistent issue with a Dial-up IPSec VPN tunnel configuration on our HQ FortiGate.

HQ Public IP -> 176.x.x.x

Location -> 91.x.x.x

Our goal is to restrict IPSec VPN connections only to a specific list of public IP addresses. To achieve this, I've configured a local-in-policy to permit only our allowed IP group (Public_IPs) and deny IKE/ESP traffic from all other sources.

Here is the current local-in-policy configuration:

config firewall local-in-policy
edit 1
set intf "FortiStore_WAN"
set srcaddr "Public_IPs"
set dstaddr "all"
set action accept
set service "IKE" "ESP"
set schedule "always"
next
edit 2
set intf "FortiStore_WAN"
set srcaddr "all"
set dstaddr "all"
set action deny
set service "IKE" "ESP"
set schedule "always"
next
end

An unauthorized remote gateway (e.g., 91.x.x.x) that is not in the Public_IPs address group is still able to establish a VPN tunnel with our HQ FortiGate.

 

 

According to the packet flow trace (diagnose debug flow):

  1. Initially, when the unauthorized IP (91.x.x.x) sends a packet, the local-in-policy successfully drops it under Policy ID 2: iprope_in_check() check failed on policy 2, drop

  2. However, shortly after, the HQ FortiGate itself initiates or responds by looking for an existing session and sending outbound traffic to the remote peer: resolve_ip_tuple_fast line=5899 msg="Find an existing session, id-40f74ec6, reply direction"

  3. Because this becomes a self-originated outbound request from the FortiGate, it bypasses the local-in-policy (which only filters inbound traffic to the box), allowing the tunnel to establish.

  • I disabled keepalive on the phase2 configurations to prevent the FortiGate from attempting to bring up the tunnel itself, but the issue still persists.

  • Since this is a Dial-up configuration, the HQ FortiGate should strictly act as a responder and never initiate connections outward to dial-up clients, yet it still generates outbound sessions.

How can I completely block these connection attempts if local-in-policy is bypassed by the firewall's own self-originated reply packets?

Thanks in advance.

4 replies

Toshi_Esumi
SuperUser
SuperUser
July 17, 2026

Not sure when exactly the local-in-policy kicks in after packets hit the physical incoming port. But if you’re not specifying the physical port (NOT the phase1-interface) in “set intf” in the local-in policies, it might not work as you expect. Or at least that’s the first thing I would suspect and test.

Toshi

sjoshi
Staff
Staff
July 17, 2026

Hi ​@barisben 

 

You may refer below article that can be helpful

 

Thanks, Salon
barisben
barisbenAuthor
New Member
July 17, 2026

About 2–3 hours after applying this local-in-policy, I had a scheduled firmware upgrade from version 7.2.11 to 7.4.12. After completing the upgrade, the local-in-policy started working as expected and is functioning correctly now.

sjoshi
Staff
Staff
July 17, 2026

great that the issue has been fixed post upgrade. Let us know if any assistance is needed

Thanks, Salon
Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!