RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1516881 - firewalld modprobe hook breaks iptables rules that automatically load nf_conntrack
Summary: firewalld modprobe hook breaks iptables rules that automatically load nf_conn...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.5-Alt
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Eric Garver
QA Contact: Tomas Dolezal
URL:
Whiteboard:
: 1519638 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-23 13:40 UTC by Tomas Dolezal
Modified: 2018-04-10 10:32 UTC (History)
7 users (show)

Fixed In Version: firewalld-0.4.4.4-13.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:32:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0702 0 None None None 2018-04-10 10:32:22 UTC

Comment 3 Phil Sutter 2017-11-28 12:06:26 UTC
That call to iptables succeeds on second try. The point is whether nf_conntrack.ko is loaded or not:

# lsmod | grep '\(nf_\|xt_\|iptable\|ip_tables\)'
# iptables -A INPUT -m connbytes --connbytes 10000:100000 --connbytes-dir both --connbytes-mode bytes
iptables: No chain/target/match by that name.
# lsmod | grep '\(nf_\|xt_\|iptable\|ip_tables\)'
nf_conntrack          262144  0 
iptable_filter        262144  0 
ip_tables             262144  1 iptable_filter
libcrc32c             262144  2 nf_conntrack,xfs
# iptables -A INPUT -m connbytes --connbytes 10000:100000 --connbytes-dir both --connbytes-mode bytes
# lsmod | grep '\(nf_\|xt_\|iptable\|ip_tables\)'
nf_conntrack_ipv4     262144  1 
nf_defrag_ipv4        262144  1 nf_conntrack_ipv4
xt_connbytes          262144  1 
nf_conntrack          262144  2 nf_conntrack_ipv4,xt_connbytes
iptable_filter        262144  1 
ip_tables             262144  1 iptable_filter
libcrc32c             262144  2 nf_conntrack,xfs
# iptables -F INPUT
# rmmod nf_conntrack_ipv4 xt_connbytes nf_conntrack
# iptables -A INPUT -m connbytes --connbytes 10000:100000 --connbytes-dir both --connbytes-mode bytes
iptables: No chain/target/match by that name.

Comment 4 Phil Sutter 2017-11-28 19:39:29 UTC
The problem here is caused by /etc/modprobe.d/firewalld-sysctls.conf: If I remove the file, module auto-loading proceeds as expected. The problematic file's content is as such:

| install nf_conntrack /usr/sbin/modprobe --ignore-install nf_conntrack && /usr/sbin/sysctl --pattern 'net[.]netfilter[.]nf_conntrack.*' --system

This causes a call to sysctl after nf_conntrack has been loaded (either automatically by the kernel or on command line using 'modprobe').

It seems that printing to stdout by sysctl upsets module auto-loading somehow. Adding '--quiet' to the sysctl call fixes the issue.

Note that while being at it, one should also add $CMDLINE_OPTS as last parameter to the modprobe call as explained in modprobe.conf(5) to allow passing module parameters via 'modprobe'.

Comment 5 Phil Sutter 2017-11-28 20:10:38 UTC
A commit with above mentioned changes is available in my recent pull request upstream: https://github.com/firewalld/firewalld/pull/265

Comment 11 Eric Garver 2017-12-04 14:25:43 UTC
(In reply to Phil Sutter from comment #5)
> A commit with above mentioned changes is available in my recent pull request
> upstream: https://github.com/firewalld/firewalld/pull/265

Merged upstream, 8a8d61822d.

Comment 13 Eric Garver 2017-12-05 15:39:46 UTC
*** Bug 1519638 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2018-04-10 10:32:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0702


Note You need to log in before you can comment on or make changes to this bug.