Bug 1733549

Summary: RFE allow counters for nft rules
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Dolezal <todoleza>
Component: firewalldAssignee: Eric Garver <egarver>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: aloughla, todoleza
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 07:44:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Dolezal 2019-07-26 13:43:30 UTC
Description of problem:
NFT created by firewalld do not create counters. They were implicitly present for iptables rules and were helpful with observing or debugging packets going through the installed ruleset.
This request is to add a tunable into firewalld which would implicitly add the counter statement into nft rules.

Version-Release number of selected component (if applicable):
firewalld-0.7.0-3.el8

How reproducible:
always, nft ruleset used

Actual results:
rules don't log traffic anywhere, not even number of how many times a rule passed a packet through

Expected results:
a global tunable to enable counters for all rules.

Additional info:

Comment 1 Eric Garver 2019-08-05 14:34:38 UTC
FWIW, it's very simple to trace with nftables which may be a better debugging mechanism than counters.

# nft add table inet trace_firewalld
# nft add rule inet trace_firewalld INPUT nftrace set 1
# nft monitor |grep firewalld |grep -i "\(drop\|reject\)"
trace id 5e9e28de inet firewalld filter_INPUT rule reject with icmpx type admin-prohibited (verdict drop)

Comment 4 Tomas Dolezal 2019-12-11 19:04:10 UTC
I've described challenges with use of nftrace in a RFE for nft-monitor in bug 1782526.

tl;dr; the output is really verbose and uncategorised. it uses just a trace id without possibility to further narrow the output when there are e.g. multiple trace enabling rules. that is a problem on bigger-than-low network traffic passing systems.

Comment 8 RHEL Program Management 2021-02-01 07:44:04 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.