Bug 1012041

Summary: SELinux is preventing /usr/sbin/openvpn from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Umberto Bar <umberto.bar>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5a4f9a1b2133e7f726db19cde870ea380525b4392fe1f01621837e02ce0709e1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-25 15:29:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Umberto Bar 2013-09-25 15:23:13 UTC
Description of problem:
SELinux is preventing /usr/sbin/openvpn from 'name_connect' accesses on the tcp_socket .

*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************

If you want to allow nis to enabled
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'None' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************

If you want to allow openvpn to can network connect
Then you must tell SELinux about this by enabling the 'openvpn_can_network_connect' boolean.
You can read 'None' man page for more details.
Do
setsebool -P openvpn_can_network_connect 1

*****  Plugin catchall (6.38 confidence) suggests  ***************************

If you believe that openvpn should be allowed name_connect access on the  tcp_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep openvpn /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:openvpn_t:s0
Target Context                system_u:object_r:pop_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        openvpn
Source Path                   /usr/sbin/openvpn
Port                          995
Host                          (removed)
Source RPM Packages           openvpn-2.3.2-4.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.4.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-200.fc19.x86_64 #1 SMP Sat
                              Sep 14 15:04:51 UTC 2013 x86_64 x86_64
Alert Count                   2148
First Seen                    2013-09-25 09:57:01 CEST
Last Seen                     2013-09-25 17:22:07 CEST
Local ID                      ba7dacb8-bb67-4d60-92bb-04580a12608a

Raw Audit Messages
type=AVC msg=audit(1380122527.49:853): avc:  denied  { name_connect } for  pid=671 comm="openvpn" dest=995 scontext=system_u:system_r:openvpn_t:s0 tcontext=system_u:object_r:pop_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1380122527.49:853): arch=x86_64 syscall=connect success=no exit=EACCES a0=4 a1=7fffae64b418 a2=10 a3=0 items=0 ppid=1 pid=671 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=openvpn exe=/usr/sbin/openvpn subj=system_u:system_r:openvpn_t:s0 key=(null)

Hash: openvpn,openvpn_t,pop_port_t,tcp_socket,name_connect

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.1-200.fc19.x86_64
type:           libreport

Potential duplicate: bug 691204

Comment 1 Daniel Walsh 2013-09-25 15:29:54 UTC
*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************

If you want to allow openvpn to can network connect
Then you must tell SELinux about this by enabling the 'openvpn_can_network_connect' boolean.
You can read 'None' man page for more details.
Do
setsebool -P openvpn_can_network_connect 1

Seems to fix the problem for you.  Is openvpn setup to send email?