Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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: 2018-04-10 10:32 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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3358861 None None None 2018-02-20 17:54:19 UTC
Red Hat Product Errata RHEA-2018:0702 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.