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 1514043 - firewalld changes the behaviours after executing --set-log-denied=all
Summary: firewalld changes the behaviours after executing --set-log-denied=all
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.4
Hardware: Unspecified
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Eric Garver
QA Contact: Tomas Dolezal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 14:45 UTC by Akhil John
Modified: 2021-08-30 13:21 UTC (History)
3 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 Knowledge Base (Solution) 3358861 0 None None None 2018-02-20 17:54:19 UTC
Red Hat Product Errata RHEA-2018:0702 0 None None None 2018-04-10 10:32:22 UTC

Description Akhil John 2017-11-16 14:45:56 UTC
Description of problem:
Firewalld replaces the existing .xml rather than appending after adding --set-log-denied=all 

Version-Release number of selected component (if applicable):
RHEL 7.4
firewalld-0.4.4.4

How reproducible:
Always

Steps to Reproduce:
1. List the firewalld rules.
 # firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: ssh dhcpv6-client
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

2. Now enable logging using:
 # firewall-cmd --set-log-denied=all

3. Now add any service/port/rich rule to the existing zone.
 # firewall-cmd --permanent --zone=public --add-service=samba
 # systemctl restart firewalld

4. Now check the firewalld rules using:
 # firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: samba
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

Actual results:
# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: samba
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

Expected results:
# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: samba ssh dhcpv6-client  <<<---------
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

Additional info:
It looks like after enabling the logging "--set-log-denied=all" the firewalld is replacing the configuration with the config which is added after mentioning the rule.

Here to reproduce the issue the important this is the "ordering" part!

Comment 3 Eric Garver 2017-11-22 17:59:37 UTC
I pushed a fix upstream: 

  8ec42cd1041b ("firewalld: also reload dbus config interface for global options")

Comment 11 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.