{"id":468,"date":"2014-11-04T17:29:34","date_gmt":"2014-11-04T15:29:34","guid":{"rendered":"http:\/\/www.treg.be\/blog\/?p=468"},"modified":"2014-11-04T18:05:34","modified_gmt":"2014-11-04T16:05:34","slug":"centos-zabbix-and-selinux","status":"publish","type":"post","link":"https:\/\/www.treg.be\/blog\/2014\/11\/centos-zabbix-and-selinux\/","title":{"rendered":"CentOS 6.x, Zabbix and SElinux"},"content":{"rendered":"<p>Since Zabbix version 2.2, I&#8217;m running into faulty\/wrong zabbix-agent SElinux policies. There is not too much information available on the web to fix this issue. The steps underneed should do:<\/p>\n<p>Install Zabbix Agent:<br \/>\n# yum install zabbix22-agent<\/p>\n<p># Edit the Zabbix Agent config file:<br \/>\n# vi \/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>Run the service:<br \/>\n# service zabbix-agentd start<\/p>\n<p>Interprete the audit log and create custom SElinux exceptions:<br \/>\n# cat \/var\/log\/audit\/audit.log | grep zab | audit2allow -M zabbix-agent<\/p>\n<p>To install audit2allow:<br \/>\n# yum install policycoreutils-python<\/p>\n<p>Verify the generated SElinux rules:<br \/>\n# vi zabbix-agent.te<\/p>\n<p>Apply the generated SElinux rules:<br \/>\n# semodule -i zabbix-agent.pp<\/p>\n<p>Additional: allow the Zabbix Agent to run on a different port, e.g. on port 8484:<br \/>\n# semanage port -a -t port_t -p tcp 8484<\/p>\n<p>Restart the Zabbix Agent service:<br \/>\n# service zabbix-agentd restart<\/p>\n<p>Verify the Zabbix Agent logs:<br \/>\n# tail \/var\/log\/zabbix\/zabbix-agentd.log<\/p>\n<p>Please feel free to optimize the procedure and leave a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since Zabbix version 2.2, I&#8217;m running into faulty\/wrong zabbix-agent SElinux policies. There is not too much information available on the web to fix this issue. The steps underneed should do: Install Zabbix Agent: # yum install zabbix22-agent # Edit the Zabbix Agent config file: # vi \/etc\/zabbix\/zabbix_agentd.conf Run the service: # service zabbix-agentd start Interprete [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[8,7],"tags":[134,135,132,133],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-linux","category-tech","tag-centos","tag-selinux","tag-zabbix","tag-zabbix-agent"],"_links":{"self":[{"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":5,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":473,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/posts\/468\/revisions\/473"}],"wp:attachment":[{"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.treg.be\/blog\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}