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 1534571 - runtime rules deduplication may remove additional rules of other services
Summary: runtime rules deduplication may remove additional rules of other services
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Garver
QA Contact: Jiri Peska
URL:
Whiteboard:
Depends On:
Blocks: 1554861
TreeView+ depends on / blocked
 
Reported: 2018-01-15 13:47 UTC by Petr Sklenar
Modified: 2018-10-30 10:12 UTC (History)
4 users (show)

Fixed In Version: firewalld-0.5.3-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:11:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screencast about removing ipp or ipp-client (706.60 KB, application/octet-stream)
2018-01-15 13:47 UTC, Petr Sklenar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3120 0 None None None 2018-10-30 10:12:19 UTC

Description Petr Sklenar 2018-01-15 13:47:14 UTC
Created attachment 1381442 [details]
screencast about removing ipp or ipp-client

Description of problem:
firewall-config cannot remove ipp/ipp-client service
Interesting is that there is port 631 in both servise

Version-Release number of selected component (if applicable):
rhel75.nightly
firewalld-0.4.4.4-14.el7.noarch
cups-1.6.3-35.el7.x86_64


How reproducible:
always, tried twice, two different rhel75

Steps to Reproduce:
1. have a cups
2. firewall-config
3. add service ipp or ipp-client
4. then try to remove it, yo can remove one or another - NOT BOTH
the last one cannot be remove, its probably caused that port 631/udp is part of both services

see video

Actual results:
firewall-config writes "cannot remove"

Expected results:
I can remove ipp*

Additional info:

[root@localhost ~]# firewall-cmd --info-service=ipp
ipp
  ports: 631/tcp 631/udp
  protocols: 
  source-ports: 
  modules: 
  destination: 

[root@localhost ~]# firewall-cmd --info-service=ipp-client
ipp-client
  ports: 631/udp
  protocols: 
  source-ports: 
  modules: 
  destination:

Comment 2 Petr Sklenar 2018-01-15 13:49:02 UTC
/var/log/message says:

Jan 15 14:37:30 localhost firewalld[760]: WARNING: '/usr/sbin/iptables-restore --wait=2 -n' failed: iptables-restore: line 2 failed
Jan 15 14:37:30 localhost firewalld[760]: WARNING: '/usr/sbin/ip6tables-restore --wait=2 -n' failed: ip6tables-restore: line 2 failed
Jan 15 14:37:30 localhost firewalld[760]: ERROR: COMMAND_FAILED
Jan 15 14:37:34 localhost firewalld[760]: WARNING: '/usr/sbin/iptables-restore --wait=2 -n' failed: iptables-restore: line 3 failed
Jan 15 14:37:34 localhost firewalld[760]: WARNING: '/usr/sbin/ip6tables-restore --wait=2 -n' failed: ip6tables-restore: line 3 failed
Jan 15 14:37:34 localhost firewalld[760]: ERROR: COMMAND_FAILED

Comment 3 Tomas Dolezal 2018-01-18 17:21:24 UTC
present in firewalld-0.4.4.4-14.el7.noarch

seems that loading permanent configuration optimizes the rules so there are no duplicate ones. that causes individual request for unloading the deduplicated ones to fail.

RUNTIME
firewall-cmd --add-service nfs3 --add-service nfs
success
[root@vm-rhel7s ~]# iptables-save | grep 2049
-A IN_public_allow -p tcp -m tcp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
-A IN_public_allow -p tcp -m tcp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
-A IN_public_allow -p udp -m udp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT

[root@vm-rhel7s ~]# firewall-cmd --remove-service nfs3
success
[root@vm-rhel7s ~]# iptables-save | grep 2049
-A IN_public_allow -p tcp -m tcp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
[root@vm-rhel7s ~]# firewall-cmd --remove-service nfs
success

PERMANENT->RUNTIME
failure here
firewall-cmd --add-service nfs --add-service nfs3 --permanent
success
firewall-cmd --reload
iptables-save | grep 2049
-A IN_public_allow -p tcp -m tcp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
-A IN_public_allow -p udp -m udp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT

-A IN_public_allow -p tcp -m tcp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
-A IN_public_allow -p udp -m udp --dport 2049 -m conntrack --ctstate NEW -j ACCEPT
[root@vm-rhel7s ~]# firewall-cmd --remove-service nfs
success
[root@vm-rhel7s ~]# firewall-cmd --remove-service nfs3
Error: COMMAND_FAILED

led 18 18:19:32 vm-rhel7s.brq.redhat.com firewalld[2373]: WARNING: '/usr/sbin/iptables-restore --wait=2 -n' failed: iptables-restore: line 2 failed
led 18 18:19:32 vm-rhel7s.brq.redhat.com firewalld[2373]: WARNING: '/usr/sbin/ip6tables-restore --wait=2 -n' failed: ip6tables-restore: line 2 failed
led 18 18:19:32 vm-rhel7s.brq.redhat.com firewalld[2373]: ERROR: COMMAND_FAILED

Comment 4 Thomas Woerner 2018-02-01 15:51:07 UTC
Please have a look at https://github.com/firewalld/firewalld/pull/288

Comment 5 Eric Garver 2018-02-01 17:58:31 UTC
Upstream commit:

   54835164f610 ("firewall/core/fw_transaction.py: Remove deduplication in add_rule")

Comment 10 errata-xmlrpc 2018-10-30 10:11:40 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/RHBA-2018:3120


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