Last active
January 18, 2016 08:41
-
-
Save beli-sk/57b5b711aa624d718c3e to your computer and use it in GitHub Desktop.
Fix (workaround) for running zabbix agent/server under SELinux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.zabbix.com/forum/showthread.php?t=43550 | |
policy_module(zabbix-fix, 1.3) | |
require { | |
type zabbix_agent_t; | |
type zabbix_t; | |
type ping_t; | |
type zabbix_tmp_t; | |
class tcp_socket name_connect; | |
} | |
allow ping_t zabbix_tmp_t:file read_file_perms; | |
allow ping_t zabbix_t:tcp_socket { read write }; | |
kernel_read_network_state(zabbix_agent_t) | |
domain_read_all_domains_state(zabbix_agent_t) | |
dev_read_sysfs(zabbix_agent_t) | |
corenet_tcp_connect_all_ports(zabbix_agent_t) | |
corenet_tcp_connect_all_ports(zabbix_t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# checkmodule -M -m -o selinux-zabbix-fix.mod selinux-zabbix-fix.te | |
# semodule_package -o selinux-zabbix-fix.pp -m selinux-zabbix-fix.mod | |
make -f /usr/share/selinux/devel/Makefile selinux-zabbix-fix.pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment