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 1136801 - a rule added into IN_<zone>_allow chain with 'permanent direct' interface doesn't exist after reload
Summary: a rule added into IN_<zone>_allow chain with 'permanent direct' interface doe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Thomas Woerner
QA Contact: Tomas Dolezal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 10:39 UTC by Mario Gamboa
Modified: 2016-11-03 21:00 UTC (History)
5 users (show)

Fixed In Version: firewalld-0.4.2-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 21:00:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1336881 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2016:2597 0 normal SHIPPED_LIVE Moderate: firewalld security, bug fix, and enhancement update 2016-11-03 12:11:47 UTC

Internal Links: 1336881

Comment 3 Jiri Popelka 2014-09-03 12:19:39 UTC
(In reply to Mario Gamboa from comment #0)
> Expected results:
> The rule must be works if we add in the gui via passthrough or via shell
> with the permanent option in the firewall-cmd

The '--permanent' option in firewall-cmd (shell) or
the 'Permanent' view in firewall-config (gui) modifies *only* permanent configuration, not the runtime.

To do a change in 'runtime' as well as 'permanent' configuration you either have to run the firewall-cmd twice, once with '--permanent' and once without it, for example:

# firewall-cmd --permanent --direct --passthrough ipv4 -A IN_drop_allow -p icmp --icmp-type=8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# firewall-cmd --direct --passthrough ipv4 -A IN_drop_allow -p icmp --icmp-type=8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

*or* add it to permanent configuration and then reload firewalld, i.e.
# firewall-cmd --permanent --direct --passthrough ipv4 -A IN_drop_allow -p icmp --icmp-type=8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# firewall-cmd --reload

See also 'Permanent Options' in firewall-cmd(1) man page.

Comment 4 Mario Gamboa 2014-09-04 01:50:42 UTC
Hi jiri

This is the problem actually when the customer try this on the "drop zone" is not working as expected the same happen if he try to open the service of ssh 

# firewall-cmd --permanent --direct --passthrough ipv4 -A IN_drop_allow -p icmp --icmp-type=8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# firewall-cmd --reload

only work in runtime for the drop zone and we can't make permanent the rule for this zone, 

if the customer run like this the command works fine but is not permanent for the drop zone 

# firewall-cmd  --direct --passthrough ipv4 -A IN_drop_allow -p icmp --icmp-type=8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# firewall-cmd --reload


In the public zone works ok

Comment 5 Mario Gamboa 2014-09-04 01:51:56 UTC
Just to be clear this is happen when the customer change to the zone drop in the zone public is works as expected.

Comment 6 Jiri Popelka 2014-09-04 09:54:46 UTC
Ok, I see it now. But I can see the same even with 'public' zone.

The reason is that when you reload firewalld, firewalld adds the direct rules *before* the chains for zones are created. The chains for zones are first created in a moment when a interface is associated with a zone.

So it fails because IN_drop_allow (or even IN_public_allow in my case) does not yet exist in that moment.

Comment 11 Thomas Woerner 2015-11-05 17:43:50 UTC
Besides fixing the issue with being able to add rules to chains of zones, there is also another idea to use icmp-block more like an icmp-filter, that is rejecting for zones using the default or ACCEPT target and that is accepting icmp types for zones using the reject or drop targets.

Is there interest in a change like this?

Comment 14 Mike McCune 2016-03-28 23:42:22 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 15 Tomas Dolezal 2016-04-07 15:30:40 UTC
Thomas, Mario's account has been closed.

Personally I like function behind the idea but this implementation might be very confusing. I mean that function of this field would invisibly depend on default-target which is not shown even in --zone-info=<zone>.
Instead, I suggest 'icmp-filter' (backward compatibile with icmp-block) and added notation like '!' before the list. What do you think?

Comment 17 Tomas Dolezal 2016-04-08 13:13:01 UTC
idea from comments 11 and 15 now has a separate bug 1325335

Comment 21 errata-xmlrpc 2016-11-03 21:00:06 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://rhn.redhat.com/errata/RHSA-2016-2597.html


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