Aug 9 06:34:46
station3
-
39 setroubleshoot: SELinux is preventing /usr/sbin/vsftpd from
name_bind access on the tcp_socket port 555. For complete SELinux messages. run
sealert
-
l 288118e7
-
c386
-
4086
-
9fed
-
2fe78865c704
[root@study ~]#
sealert
-
l 288118e7
-
c386
-
4086
-
9fed
-
2f
e78865c704
SELinux is preventing /usr/sbin/vsftpd from name_bind access on the tcp_socket port 555.
***** Plugin bind_ports (92.2 confidence) suggests ************************
If you want to allow /usr/sbin/vsftpd to bind to network port 555
Then you
need to modify the port type.
Do
#
semanage port
-
a
-
t PORT_TYPE
-
p tcp 555
where PORT_TYPE is one of the following: certmaster_port_t, cluster_port_t,
ephemeral_port_t, ftp_data_port_t,
ftp_port_t
, hadoop_datanode_port_t, hplip_port_t,
port_t, postg
rey_port_t, unreserved_port_t.
.....(
后面省略
).....
#
看一下信任度,高
达
92.2%
耶!几乎就是
这
家伙~因此不必再看~就是他了!比
½
重要的是,
#
½
决
方案里面,那
个
PORT_TYPE
有很多
选择
~但我
们
是要
开启
FTP
埠口嘛!所以,
#
就由后
续数
据找到
ftp_port_t
那
个项
目
啰
!
带
入
实验
看看!
# 3.
实际带
入
SELinux
埠口修
订
后,在重新
启动
vsftpd
看看
[root@study ~]#
semanage port
-
a
-
t
ftp_port_t
-
p tcp 555
[root@study ~]#
systemctl restart vsftpd
[root@study ~]#
netstat
-
tlnp
Active Internet connections (only servers)
Proto Recv
-
Q Send
-
Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0
.0.0.0:* LISTEN 1167/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1598/master
tcp6 0 0 :::555 :::* LISTEN 8436/vsftpd
tcp6 0 0 :::22 :::* LISTEN 1167
/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1598/master
# 4.
实验
看看
这个
port
能不能用?
[root@study ~]#
curl ftp://localhost:555/pub/
-
rw
-
r
--
r
--
1 0 0 221 Oct 29 2014 securetty
-
rw
-
r
--
r
--
1 0 0
225 Mar 06 03:05 sysctl.conf
透过上面的几个小练习,你会知道在正规或非正规的环境下,如何处理你的
SELinux
问题哩!仔细
研究看看啰!
16.6
重点回顾