Skip to content

Firewall: Rules - Per-rule adaptive timeouts #5487

Description

@ganguin

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

I manage a setup with global adaptative timeout. Additionally, I have a max-src-state directive such that a single source cannot fill the global state table. However, with this configuration the adaptative timeout does not kick in when a user reaches his max-src-state. pf allows to configure the adaptative timeout directive on a rule, alongside with max-src-state, but the OPNsense configuration does not allow to set the adaptative timeout on a firewall rule.

The global adaptative seeting are present in /system_advanced_firewall.php under Firewall Adaptive Timeouts (values start and end).

The same options are missing in /firewall_rules_edit.php?if=xxx (all interfaces) in the Advanced Options alongside with "Max states" or "Max source states".

Describe the solution you like

Add the adaptative timeout start and end fields in the advanced rule configuration (in /firewall_rules_edit.php?if=xxx) together with "Max source states" such that the pf rule would end up like this:

pass from XXX to YYY keep state (max-src-states <nnn>, adaptive.start <mmm>, adaptive.end <ooo>)

With an agressive start and end configuration, a user coming close to his Max source states will likely not experience packet drop because of the timeout becoming really short.

Describe alternatives you considered

Globally shortening TCP timeouts is not really an option, as the defaults are sane values. Tuning the global adaptative timeouts comes either with the problem that one src could impact all others on the network or the src with a lot of states experiencing packet losses; there seem not to be a setting were both can be satisfied without the per rule adaptative settings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

featureAdding new functionalityroadmapMajor roadmap item

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions