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.
DescriptionMauricio Teixeira
2016-04-18 20:52:12 UTC
RHEL7 is missing an SELinux rule that would allow OpenVPN to bind to a UDP socket:
***
module ovpn 2.0;
require {
type reserved_port_t;
class udp_socket name_bind;
}
#============= openvpn_t ==============
allow openvpn_t reserved_port_t:udp_socket name_bind;
***
I would like to know if it's possible to integrate this rule on the package that ships from EPEL7.
What port are you trying to bind to? The default port 1194 is labeled openvpn_port_t and openvpn should be able to use it. If you want to use a different port you need to do:
semanage port --add -t openvpn_port_t -p udp <port>
Comment 2Mauricio Teixeira
2016-04-28 12:20:41 UTC
So there is an inconsistency here.
We use port 443 to avoid issues with random firewalls. The TCP daemon loads fine, out of the box, without any SELinux modifications. However for UDP I had to run the semanage rule above.
It would be good if UDP was allowed to use 443 by default, just like TCP is.
If you are going to use a different port than the standard one you are going to need to make selinux modifications. These are the standard ports:
# semanage port -l | grep openvpn
openvpn_port_t tcp 1194
openvpn_port_t udp 1194
443 is the standard port for https, so:
# semanage port -l | grep 443
http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000
I'm reassigning to the selinux folks to see what is up with TCP working. But the UDP behavior is as expected.
Ok we don't support this labeling in the policy. I believe the best solution for this local modification is a local change using semanage how Orion wrote above.
semanage port --add -t openvpn_port_t -p udp <port>
Thank you.
RHEL7 is missing an SELinux rule that would allow OpenVPN to bind to a UDP socket: *** module ovpn 2.0; require { type reserved_port_t; class udp_socket name_bind; } #============= openvpn_t ============== allow openvpn_t reserved_port_t:udp_socket name_bind; *** I would like to know if it's possible to integrate this rule on the package that ships from EPEL7.