Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Baba_Yaga
New Contributor

Disabling a policy on Fortigate 4401F but existing traffic continues

Is there a config parameter that I'm issuing that will shut down an existing traffic flow when a firewall policy is disabled?  Disabling the policy stops any new connections but doesn't shut down traffic for an existing session which is what I'm trying to do. 

 

Thanks.

 

7 REPLIES 7
AEK
SuperUser
SuperUser

You need to kill the session.

AEK
AEK
Baba_Yaga
New Contributor

kill all of the sessions manually?  due to the nature of the environment these are in i will have many sessions.up that all need to be killed immediately upon disabling the firewall rule.  seems like a missing feature to not have the ability to match state of existing sessions with a rule state change.        

AEK

It seems there is a solution with firewall-session-dirty.

Check this tech tip.

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Information-about-firewall-session-dirty/t...

Hope it helps.

AEK
AEK
Baba_Yaga
New Contributor

AEK - this sounds like exactly what I was hoping for.  i will do some testing and see.  do you happen to know if this is a global param or is this set per individual

policy? 

AEK

As per the tech tip, I understand that you first need to enable the global parameter, then you will be able to enable it per policy.

AEK
AEK
funkylicious

You can do a filter for the sessions and kill/clear them, https://community.fortinet.com/t5/FortiGate/Technical-Tip-Using-filters-to-clear-sessions-on-a-Forti...

"jack of all trades, master of none"
"jack of all trades, master of none"
dingjerry_FTNT

Hi @Baba_Yaga ,

 

Once you disable the firewall policy, you can clear the session with this firewall policy as below:

 

1) Get the policy ID of this firewall policy

In the GUI, if there is a name for the policy, hover the mouse over the name, and you will see the policy ID.  Otherwise, right click on the policy to select "_Edit in CLI", it will bring up the CLI widget and show you the policy ID

 

2) Run the following CLI commands in the VDOM for this firewall policy if you have VDOM enabled:

 

diag sys session filter clear  

diag sys session filter policy xx  //  xx is the policy ID

diag sys session clear

diag sys session list  // It should show 0 count as the result

diag sys session filter clear

 

Regards,

Jerry
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors