Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1391143

Summary: rich rules do not drop host(s) in masquerading zone
Product: Red Hat Enterprise Linux 7 Reporter: lejeczek <peljasz>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED WORKSFORME QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: peljasz, psutter, todoleza
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 16:50:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lejeczek 2016-11-02 15:57:44 UTC
Description of problem:

is this not a bug?:

yes, to me too it sort of defines basic logic - one would expect to be able with a "rich rule" to block/ban a host (actually there are quite few articles on the net stating it should be doing that)

public (active)
  interfaces: em3
  sources:
  services: dhcpv6-client ssh
  ports:
  masquerade: yes
  forward-ports:
  icmp-blocks:
  rich rules:
        rule family="ipv4" source address="192.168.2.0/24" reject

yet host from 192.168.2.0/24 (which is firewalld's zone work) are able to masquerade and access all (in this case whole Internet) behind em3 interface.
It smells like a bug to me.


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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Thomas Woerner 2016-11-04 14:13:59 UTC
The external address 192.168.2.0/24 will be blocked, not an internal.

There is a solution: Masquerade all but 192.168.2.0/24 with a rich rule

rule family="ipv4" source NOT address="192.168.2.0/24" masquerade

And deactivate masquerading in the zone. Please do not forget to enable masquerading for IPv6 if needed.

Comment 3 Phil Sutter 2017-06-26 16:50:09 UTC
Hi,

(In reply to Thomas Woerner from comment #2)
> The external address 192.168.2.0/24 will be blocked, not an internal.
> 
> There is a solution: Masquerade all but 192.168.2.0/24 with a rich rule
> 
> rule family="ipv4" source NOT address="192.168.2.0/24" masquerade
> 
> And deactivate masquerading in the zone. Please do not forget to enable
> masquerading for IPv6 if needed.

This ticket didn't receive an update for quite a while, therefore I assume the above advice resolved reporter's issue. Please feel free to reopen in case I am wrong.

Thanks, Phil

Comment 4 lejeczek 2021-08-11 11:55:57 UTC
ok