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 1030627 - iptables restart fails on OpenShift on RHEL 6.5
Summary: iptables restart fails on OpenShift on RHEL 6.5
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 1030780
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 20:12 UTC by Mrunal Patel
Modified: 2013-11-15 18:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-15 18:16:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mrunal Patel 2013-11-14 20:12:18 UTC
Description of problem:
iptables restart fails on OpenShift on RHEL 6.5

Applying this rule gets us past the issue:

    module iprule2 1.0;
     
    require {
            type admin_home_t;
            type iptables_t;
            class file { read open };
    }
     
    #============= iptables_t ==============
    allow iptables_t admin_home_t:file open;
     
    #!!!! This avc is allowed in the current policy
    allow iptables_t admin_home_t:file read;



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


How reproducible:


Steps to Reproduce:
1. Spin up OpenShift with RHEL 6.5
2. iptables restart

Actual results:
[~]# service iptables restart
iptables: Applying firewall rules: Can't open /etc/sysconfig/iptables: Permission denied
                                                           [FAILED]


Expected results:
[~]# service iptables restart
iptables: Applying firewall rules:                         [  OK  ]

Comment 1 Milos Malik 2013-11-14 20:22:43 UTC
What is the output of following command on your machine?

# ls -Z /etc/sysconfig/iptables*

Comment 3 Adam Miller 2013-11-14 20:45:00 UTC
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 /etc/sysconfig/iptables

Comment 4 Adam Miller 2013-11-14 20:47:39 UTC
Apologies.

-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 /etc/sysconfig/iptables
-rw-------. root root system_u:object_r:system_conf_t:s0 /etc/sysconfig/iptables-config

Comment 5 Milos Malik 2013-11-15 08:02:48 UTC
Please, run "restorecon -Rv /etc" on your machine. The /etc/sysconfig/iptables is mislabeled. Possible cause: it was moved from /root directory into /etc/sysconfig directory (mv preserves SELinux context, cp does not).

According to SELinux policy the files should have following labels:
# matchpathcon /etc/sysconfig/iptables
/etc/sysconfig/iptables	system_u:object_r:system_conf_t:s0
# matchpathcon /etc/sysconfig/iptables-config
/etc/sysconfig/iptables-config	system_u:object_r:system_conf_t:s0
#

Comment 6 Adam Miller 2013-11-15 18:16:08 UTC
This appears to be a flaw in the way we're constructing our internal development environments. I've submitted a pull request to fix this.

https://github.com/openshift/li/pull/2163

Closing, NOTABUG.


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