In my opinion, #41422 is already fixed by PR #67931, and this assertion is not required anymore.
It is probably a rare use-case to use fail2ban without iptables (and thus in turn without networking.firewall), e.g. for plain logging purposes or with other actions like nftables-allports, shorewall or cloudflare (which are all alternative firewalls/approaches), but merging this PR would prohibit these usecases.
In my opinion, it would make more sense as a warning or info, e.g. with lib.warn. That way, uses who do not know about this interaction are warned, while the warning/info can be ignored when everything is fine.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.