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 1182671 - Can`t delete direct rule using firewall-cmd
Summary: Can`t delete direct rule using firewall-cmd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firewalld
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Thomas Woerner
QA Contact: Tomas Dolezal
URL:
Whiteboard:
Depends On: 1182641
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-15 16:53 UTC by Thomas Woerner
Modified: 2015-11-19 12:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: An already removed permanent direct rule has been re-applied while reloading if it was applied in runtime before. Consequence: It was not possible to simply remove a permanent direct rule with a reload without removing the rule also in the runtime environment. Fix: Only direct rules added to runtime only are automatically re-applied while reloading. Direct rules in the permanent environment are also applied as before. Result: No already removed permenent direct rules after reload.
Clone Of: 1182641
Environment:
Last Closed: 2015-11-19 12:59:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2422 0 normal SHIPPED_LIVE firewalld bug fix and enhancement update 2015-11-19 11:22:52 UTC

Description Thomas Woerner 2015-01-15 16:53:40 UTC
+++ This bug was initially created as a clone of Bug #1182641 +++

Description of problem:
Can`t delete direct rule using firewall-cmd tool

Version-Release number of selected component (if applicable):
version 0.3.13

How reproducible:


Steps to Reproduce:
# firewall-cmd --permanent --direct --add-rule ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 81
# firewall-cmd --reload
# firewall-cmd --permanent --direct --remove-rule ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 81
# firewall-cmd --permanent --direct --add-rule ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 82
# firewall-cmd --reload
# firewall-cmd --direct --get-all-rules
Actual results:
ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 81
ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 82

Expected results:
ipv4 nat OUTPUT 0 -s 127.0.0.1 -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to-ports 82

Additional info:
Also tested on Oracle Enterprise Linux 7, version 0.3.9

--- Additional comment from Thomas Woerner on 2015-01-15 11:48:38 EST ---

Fixed upstream: https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=133e8e7cc77dfe10269ac146f3c03810f50062dd

--- Additional comment from Thomas Woerner on 2015-01-15 11:52:36 EST ---

Permanent direct settings are not recognized as such while reloading firewalld after adding the settings to the permanent environment if firewalld has been reloaded after adding the settings in the first place and after they have been removed again from the permanent environment.

A new test has been added to firewall-cmd_test.sh for verification.

Comment 4 errata-xmlrpc 2015-11-19 12:59:45 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/RHBA-2015-2422.html


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