Bug 2228505 - services "included" are not in effect when part of 'rich-rules'
Summary: services "included" are not in effect when part of 'rich-rules'
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: firewalld
Version: CentOS Stream
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Eric Garver
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-02 13:30 UTC by lejeczek
Modified: 2023-08-02 13:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-164189 0 None None None 2023-08-02 13:31:19 UTC

Description lejeczek 2023-08-02 13:30:12 UTC
Description of problem:

-> $ firewall-cmd --info-service=kube-control-plane-secure 
kube-control-plane-secure
  ports: 
  protocols: 
  source-ports: 
  modules: 
  destination: 
  includes: etcd-client etcd-server kube-apiserver kube-controller-manager-secure kube-scheduler-secure
  helpers:

-> $ firewall-cmd --info-service=kube-apiserver 
kube-apiserver
  ports: 6443/tcp
  protocols: 
...

-> $ _FIRE=kube-control-plane-secure; firewall-cmd --zone=internal --add-rich-rule=\"rule family="ipv4" source address=${_IP} service name=${_FIRE} accept\"

-> $ nmap 10.3.1.61 -p 6443 # result -> filtered

-> $ _FIRE=kube-apiserver; firewall-cmd --zone=internal --add-rich-rule=\"rule family="ipv4" source address=${_IP} service name=${_FIRE} accept\"

-> $ nmap 10.3.1.61 -p 6443 # result -> open

Does that make sense?
Also, if such service - eg. kube-control-plane-secure - is allowed "normally", in 'service' then what happens is what I'd expect - included services get allowed too.

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

firewalld-filesystem-1.2.1-1.el9.noarch
firewalld-1.2.1-1.el9.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


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