我最近使用vmalert模块(Victoriametrics产品)配置了警报系统。在我的系统上,有一个强制执行的SELinux策略,它将保持不变。当尝试运行vmalert时,它被SELinux阻止。
直到我grep audit.log的内容并将其提供给audit2allow以创建策略时,才发生这种情况。此外,我可以通过在Selinux中启用“nis boolean”来确保它正常工作。不过,我坚信有更好的方法让它运行。在这方面的任何援助都是值得赞赏的。下面是建议加载到Selinux中的策略片段:
module vmalert 1.0;
require {
type init_t;
type unreserved_port_t;
type http_port_t;
class tcp_socket name_connect;
}
#============= init_t ==============
#!!!! This avc can be allowed using the boolean 'nis_enabled'
allow init_t http_port_t:tcp_socket name_connect;
#!!!! This avc can be allowed using the boolean 'nis_enabled'
allow init_t unreserved_port_t:tcp_socket name_connect;
1条答案
按热度按时间46scxncf1#
您可以只允许被阻止的内容(到http端口和未保留端口的TCP连接):