This is an old revision of the document!
# sestatus -v # id -Z
# echo "<h1>Hello World</h1>" > /var/www/html/index.html # ls -Za /var/www/html/ # echo "<h1>Hello World 2</h1>" > /root/index.html # mv /root/index.html /var/www/html/index.html # ls -Za /var/www/html/ # chcon -v -t httpd_sys_content_t /var/www/html/index.html или более правильно # yum install setroubleshoot # sealert -a /var/log/audit/audit.log # yum install policycoreutils-python-utils # semanage fcontext -l | grep '/var/www' # restorecon -v /var/www/html/index.html
# ps axZ | grep ssh # ss -tupanZ | grep ssh # runcon -t sshd_t -r system_r -u system_u /usr/sbin/sshd -p 2222 -d # semanage port -l | grep ssh # semanage port -a -t ssh_port_t -p tcp 2222 # semanage port -d -t ssh_port_t -p tcp 22
# semanage boolean -l | grep zabbix ... или # getsebool -a | grep zabbix ... # setsebool -P httpd_can_connect_zabbix on
# yum install -y setools-console # sesearch --allow | tee se_allow.txt ... allow sshd_t ssh_port_t:tcp_socket name_bind; ... allow httpd_t zabbix_port_t:tcp_socket name_connect; [ httpd_can_connect_zabbix ]:True ...