Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1514043 - firewalld changes the behaviours after executing --set-log-denied=all
firewalld changes the behaviours after executing --set-log-denied=all
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld (Show other bugs)
7.4
Unspecified Linux
urgent Severity urgent
: rc
: ---
Assigned To: Eric Garver
Tomas Dolezal
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-16 09:45 EST by Akhil John
Modified: 2018-04-10 06:32 EDT (History)
3 users (show)

See Also:
Fixed In Version: firewalld-0.4.4.4-13.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 06:32:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3358861 None None None 2018-02-20 12:54 EST
Red Hat Product Errata RHEA-2018:0702 None None None 2018-04-10 06:32 EDT

  None (edit)
Description Akhil John 2017-11-16 09:45:56 EST
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 12:59:37 EST
I pushed a fix upstream: 

  8ec42cd1041b ("firewalld: also reload dbus config interface for global options")
Comment 11 errata-xmlrpc 2018-04-10 06:32:16 EDT
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.