OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: tcpip on August 12, 2022, 06:47:53 PM

Title: Flush states on gateway switching
Post by: tcpip on August 12, 2022, 06:47:53 PM
Hey guys,

since the option "Disable State Killing on Gateway Failure" is removed* since a while now, I was wondering how to get back the "old" behaviour without the option beeing ticked. I just use default gateway switching with my dual WAN setup and have a metered LTE connection as backup. As soon as my primary WAN comes back online I want all states to be killed, so that there is no traffic beeing routed via my backup link any longer.

Thanks!

EDIT: I wrote a script to handle this for now.

*https://forum.opnsense.org/index.php?topic=28179 (https://forum.opnsense.org/index.php?topic=28179)
Title: Re: Flush states on gateway switching
Post by: hescominsoon on August 15, 2022, 02:52:00 AM
care to share the script?
Title: Re: Flush states on gateway switching
Post by: dalton_lopes on July 29, 2023, 12:59:03 PM
can you post here your script?
Title: Re: Flush states on gateway switching
Post by: franco on September 08, 2023, 10:42:31 AM
There is a ticket for this. https://github.com/opnsense/core/issues/6803

The design isn't clear yet but the use case is valid.


Cheers,
Franco