pptp and SELinux errors
Hello All,
I have been working to get a daemon called PPTP set up and which provides me to set up a VPN with another machine.
The problem is that I am getting come errors and it will not let me connect.
---------------------------------------------------------------------
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control
connection started
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Starting call (launching
pppd, opening GRE)
Feb 25 16:40:20 tarus kernel:
Feb 25 16:40:20 tarus kernel: avc: denied { create } for pid=2246
exe=/usr/sbin/pptpctrl scontext=root:sysadm_r:sysadm_t
tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket
Feb 25 16:40:20 tarus kernel:
Feb 25 16:40:20 tarus kernel: avc: denied { read write } for
pid=2247 exe=/usr/sbin/pppd path=/dev/ppp dev=03:02 ino=33955
scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t
tclass=chr_file
Feb 25 16:40:20 tarus pppd[2247]: pppd 2.4.1 started by root, uid 0
Feb 25 16:40:20 tarus modprobe: modprobe: Can't locate module tty-
ldisc-3
Feb 25 16:40:20 tarus kernel:
Feb 25 16:40:20 tarus kernel: avc: denied { bind } for pid=2246
exe=/usr/sbin/pptpctrl lport=47 scontext=root:sysadm_r:sysadm_t
tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket
Feb 25 16:40:20 tarus kernel:
Feb 25 16:40:20 tarus kernel: avc: denied { connect } for pid=2246
exe=/usr/sbin/pptpctrl laddr=192.168.1.7 lport=47
scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t
tclass=rawip_socket
Feb 25 16:40:20 tarus pppd[2247]: Couldn't set tty to PPP discipline:
Invalid argument
Feb 25 16:40:20 tarus pppd[2247]: Exit.
Feb 25 16:40:20 tarus pptpd[2246]: GRE: read
(fd=4,buffer=804d8c0,len=8196) from PTY failed: status = -1 error =
Input/output error
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: PTY read or GRE write failed
(pty,gre)=(4,5)
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control
connection finished
Feb 25 16:41:33 tarus kernel:
Feb 25 16:41:33 tarus kernel: avc: denied { search } for pid=2237
exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t
tcontext=system_u:object_r:unlabeled_t tclass=dir
Feb 25 16:41:33 tarus kernel:
Feb 25 16:41:33 tarus kernel: avc: denied { read } for pid=2237
exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t
tcontext=system_u:object_r:unlabeled_t tclass=dir
Feb 25 16:41:40 tarus kernel:
Feb 25 16:41:40 tarus kernel: avc: denied { getattr } for pid=2237exe=/usr/bin/mc path=/lonnie/.sversionrc dev=00:0a ino=98114 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=file
--------------------------------------------------------------------
I am trying to find out if this is an SELinunx policy problem or a configuration problem with pptp.
does anyone have any ideas on this?
Cheers,
Lonnie
Signature · 21 lines
Lonnie Cumberland OutStep Technologies Incorporated EMAIL: [email protected] : [email protected] The Basis Express Virtual Office & Data Backup and Recovery Services URL: http://www.basis-express.com "The Virtual Office without boundries!!!" -- You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
The avc denied messages indicate that SELinux is denying accesses needed by this daemon. You need to put this daemon into an existing domain that is authorized for these operations, or you need to define a new domain for that purpose. I'd suggest looking at the pppd_t domain posted to the list by Russell Coker and some of the other network-related domains, e.g. ipsec_t, netutils_t, etc.
--
Stephen D. Smalley, NAI Labs
[email protected]
Quoted 87 lines · Lonnie Cumberland
Hello All,
I have been working to get a daemon called PPTP set up and which provides me to set up a VPN with another machine.
The problem is that I am getting come errors and it will not let me connect.
---------------------------------------------------------------------
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control connection started Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Starting call (launching pppd, opening GRE) Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { create } for pid=2246 exe=/usr/sbin/pptpctrl scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { read write } for pid=2247 exe=/usr/sbin/pppd path=/dev/ppp dev=03:02 ino=33955 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t tclass=chr_file Feb 25 16:40:20 tarus pppd[2247]: pppd 2.4.1 started by root, uid 0 Feb 25 16:40:20 tarus modprobe: modprobe: Can't locate module tty- ldisc-3 Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { bind } for pid=2246 exe=/usr/sbin/pptpctrl lport=47 scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { connect } for pid=2246 exe=/usr/sbin/pptpctrl laddr=192.168.1.7 lport=47 scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus pppd[2247]: Couldn't set tty to PPP discipline: Invalid argument Feb 25 16:40:20 tarus pppd[2247]: Exit. Feb 25 16:40:20 tarus pptpd[2246]: GRE: read (fd=4,buffer=804d8c0,len=8196) from PTY failed: status = -1 error = Input/output error Feb 25 16:40:20 tarus pptpd[2246]: CTRL: PTY read or GRE write failed (pty,gre)=(4,5) Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control connection finished Feb 25 16:41:33 tarus kernel: Feb 25 16:41:33 tarus kernel: avc: denied { search } for pid=2237 exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=dir Feb 25 16:41:33 tarus kernel: Feb 25 16:41:33 tarus kernel: avc: denied { read } for pid=2237 exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=dir Feb 25 16:41:40 tarus kernel: Feb 25 16:41:40 tarus kernel: avc: denied { getattr } for pid=2237exe=/usr/bin/mc path=/lonnie/.sversionrc dev=00:0a ino=98114 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=file
--------------------------------------------------------------------
I am trying to find out if this is an SELinunx policy problem or a configuration problem with pptp.
does anyone have any ideas on this?
Cheers,
Lonnie--
Lonnie Cumberland
OutStep Technologies Incorporated
EMAIL: [email protected]
: [email protected]The Basis Express Virtual Office
&Data Backup and Recovery Services
URL: http://www.basis-express.com
"The Virtual Office without boundries!!!"
Quoted 5 lines
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Thanks Stephen,
I am trying to locate it now but am not clear as to what needs to be done to install it and update the policies. Then I need to be able to tie the application daemon to the policy.
Actually I will try and modify it and make a new pptp_t daemon as well.
Cheers,
Lonnie
Quoted 9 lines
The avc denied messages indicate that SELinux is denying accesses needed by this daemon. You need to put this daemon into an existing domain that is authorized for these operations, or you need to define a new domain for that purpose. I'd suggest looking at the
pppd_tdomain posted to the list by Russell Coker and some of the other network-related domains, e.g.ipsec_t,netutils_t, etc.
Quoted 17 lines
--
Stephen D. Smalley, NAI Labs
[email protected]Quoted 9 lines · Lonnie Cumberland
Hello All,
I have been working to get a daemon called PPTP set up and which provides me to set up a VPN with another machine.
The problem is that I am getting come errors and it will not let me connect.
-------------------------------------------------------------------
--
Quoted 54 lines
Quoted 54 lines
Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control connection started Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Starting call (launching pppd, opening GRE) Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { create } for pid=2246 exe=/usr/sbin/pptpctrl scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { read write } for pid=2247 exe=/usr/sbin/pppd path=/dev/ppp dev=03:02 ino=33955 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t tclass=chr_file Feb 25 16:40:20 tarus pppd[2247]: pppd 2.4.1 started by root, uid 0 Feb 25 16:40:20 tarus modprobe: modprobe: Can't locate module tty- ldisc-3 Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { bind } for pid=2246 exe=/usr/sbin/pptpctrl lport=47 scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus kernel: Feb 25 16:40:20 tarus kernel: avc: denied { connect } for pid=2246 exe=/usr/sbin/pptpctrl laddr=192.168.1.7 lport=47 scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket Feb 25 16:40:20 tarus pppd[2247]: Couldn't set tty to PPP discipline: Invalid argument Feb 25 16:40:20 tarus pppd[2247]: Exit. Feb 25 16:40:20 tarus pptpd[2246]: GRE: read (fd=4,buffer=804d8c0,len=8196) from PTY failed: status = -1 error = Input/output error Feb 25 16:40:20 tarus pptpd[2246]: CTRL: PTY read or GRE write failed (pty,gre)=(4,5) Feb 25 16:40:20 tarus pptpd[2246]: CTRL: Client 192.168.1.12 control connection finished Feb 25 16:41:33 tarus kernel: Feb 25 16:41:33 tarus kernel: avc: denied { search } for pid=2237 exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=dir Feb 25 16:41:33 tarus kernel: Feb 25 16:41:33 tarus kernel: avc: denied { read } for pid=2237 exe=/usr/bin/mc dev=00:0a ino=2 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=dir Feb 25 16:41:40 tarus kernel: Feb 25 16:41:40 tarus kernel: avc: denied { getattr } forpid=2237 exe=/usr/bin/mc path=/lonnie/.sversionrc dev=00:0a ino=98114
scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:unlabeled_t tclass=file
Quoted 1 line
Quoted 1 line
-------------------------------------------------------------------
-
Quoted 32 lines
Quoted 32 lines
I am trying to find out if this is an SELinunx policy problem or a configuration problem with pptp.
does anyone have any ideas on this?
Cheers,
Lonnie--
Lonnie Cumberland
OutStep Technologies Incorporated
EMAIL: [email protected]
: [email protected]The Basis Express Virtual Office
&Data Backup and Recovery Services
URL: http://www.basis-express.com
"The Virtual Office without boundries!!!"
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Signature · 21 lines
Lonnie Cumberland OutStep Technologies Incorporated EMAIL: [email protected] : [email protected] The Basis Express Virtual Office & Data Backup and Recovery Services URL: http://www.basis-express.com "The Virtual Office without boundries!!!" -- You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hello All,
I now have the pppd_te files that you were talking about, but was wondering if it would be easier to just add the pptp daemon to a domain that already had these permissions as you have previously mentioned?
If so then how might I go about that?
My basic project is to all my VPN connections using the VPN software pptp from
which relies on the ppp stuff.
------------------------------------------------------------------
Feb 26 09:58:34 tarus pptpd[3936]: CTRL: Client 192.168.1.12 control
connection started
Feb 26 09:58:34 tarus pptpd[3936]: CTRL: Starting call (launching
pppd, opening GRE)
Feb 26 09:58:34 tarus kernel:
Feb 26 09:58:34 tarus kernel: avc: denied { create } for pid=3936
exe=/usr/sbin/pptpctrl scontext=root:sysadm_r:sysadm_t
tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket
Feb 26 09:58:34 tarus kernel:
Feb 26 09:58:34 tarus kernel: avc: denied { bind } for pid=3936
exe=/usr/sbin/pptpctrl lport=47 scontext=root:sysadm_r:sysadm_t
tcontext=root:sysadm_r:sysadm_t tclass=rawip_socket
Feb 26 09:58:34 tarus kernel:
Feb 26 09:58:34 tarus kernel: avc: denied { connect } for pid=3936
exe=/usr/sbin/pptpctrl laddr=192.168.1.7 lport=47
scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t
tclass=rawip_socket
Feb 26 09:58:34 tarus kernel:
Feb 26 09:58:34 tarus kernel: avc: denied { read write } for
pid=3937 exe=/usr/sbin/pppd path=/dev/ppp dev=03:02 ino=33955
scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t
tclass=chr_file
Feb 26 09:58:34 tarus pppd[3937]: pppd 2.4.1 started by root, uid 0
Feb 26 09:58:35 tarus modprobe: modprobe: Can't locate module tty-
ldisc-3
Feb 26 09:58:35 tarus pppd[3937]: Couldn't set tty to PPP discipline:
Invalid argument
Feb 26 09:58:35 tarus pppd[3937]: Exit.
Feb 26 09:58:35 tarus pptpd[3936]: GRE: read
(fd=4,buffer=804d8c0,len=8196) from PTY failed: status = -1 error =
Input/output error
Feb 26 09:58:35 tarus pptpd[3936]: CTRL: PTY read or GRE write failed
(pty,gre)=(4,5)
Feb 26 09:58:35 tarus pptpd[3936]: CTRL: Client 192.168.1.12 controlconnection finished
--------------------------------------------------------------------
These are my lates set up errors from my /var/log/messages file.
Cheers,
Lonnie
Signature · 21 lines
Lonnie Cumberland OutStep Technologies Incorporated EMAIL: [email protected] : [email protected] The Basis Express Virtual Office & Data Backup and Recovery Services URL: http://www.basis-express.com "The Virtual Office without boundries!!!" -- You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · Lonnie Cumberland
I now have the
pppd_tefiles that you were talking about, but was wondering if it would be easier to just add the pptp daemon to a domain that already had these permissions as you have previously mentioned?If so then how might I go about that?
I'd suggest merging Russell Coker's pppd_t domain (since pptpd is obviously running pppd), and then determine whether pptpd should run in the same domain or whether it requires its own domain (that transitions to pppd_t upon running pppd). If you want to run pptpd in the same domain as pppd, then simply assign the pptpd executable the pppd_exec_t type and then restart the daemon.
The quick way to assign pptpd executable the pppd_exec_t type is to use chcon, e.g. chcon system_u:object_r:pppd_exec_t /usr/sbin/pptpd. However, it is generally advisable to also update your setfiles/file_contexts file so that subsequent 'make relabel' commands will preserve the type.
When starting the daemon, you should be using run_init on the rc script for starting/stopping the daemon rather than directly starting it. Otherwise, it won't end up with the right security context.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.