1zabbix_selinux(8) SELinux Policy zabbix zabbix_selinux(8)
2
3
4
6 zabbix_selinux - Security Enhanced Linux Policy for the zabbix pro‐
7 cesses
8
10 Security-Enhanced Linux secures the zabbix processes via flexible
11 mandatory access control.
12
13 The zabbix processes execute with the zabbix_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep zabbix_t
20
21
22
24 The zabbix_t SELinux type can be entered via the zabbix_exec_t file
25 type.
26
27 The default entrypoint paths for the zabbix_t domain are the following:
28
29 /usr/bin/zabbix_server, /usr/sbin/zabbix_proxy, /usr/sbin/zab‐
30 bix_server, /usr/sbin/zabbix_proxy_mysql, /usr/sbin/zabbix_proxy_pgsql,
31 /usr/sbin/zabbix_server_mysql, /usr/sbin/zabbix_server_pgsql,
32 /usr/sbin/zabbix_proxy_sqlite3, /usr/sbin/zabbix_server_sqlite3
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 zabbix policy is very flexible allowing users to setup their zabbix
42 processes in as secure a method as possible.
43
44 The following process types are defined for zabbix:
45
46 zabbix_t, zabbix_agent_t, zabbix_script_t
47
48 Note: semanage permissive -a zabbix_t can be used to make the process
49 type zabbix_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. zabbix
56 policy is extremely flexible and has several booleans that allow you to
57 manipulate the policy and run zabbix with the tightest access possible.
58
59
60
61 If you want to determine whether zabbix can connect to all TCP ports,
62 you must turn on the zabbix_can_network boolean. Disabled by default.
63
64 setsebool -P zabbix_can_network 1
65
66
67
68 If you want to allow Zabbix to run su/sudo, you must turn on the zab‐
69 bix_run_sudo boolean. Disabled by default.
70
71 setsebool -P zabbix_run_sudo 1
72
73
74
75 If you want to allow all domains to execute in fips_mode, you must turn
76 on the fips_mode boolean. Enabled by default.
77
78 setsebool -P fips_mode 1
79
80
81
83 SELinux defines port types to represent TCP and UDP ports.
84
85 You can see the types associated with a port by using the following
86 command:
87
88 semanage port -l
89
90
91 Policy governs the access confined processes have to these ports.
92 SELinux zabbix policy is very flexible allowing users to setup their
93 zabbix processes in as secure a method as possible.
94
95 The following port types are defined for zabbix:
96
97
98 zabbix_agent_port_t
99
100
101
102 Default Defined Ports:
103 tcp 10050
104
105
106 zabbix_port_t
107
108
109
110 Default Defined Ports:
111 tcp 10051
112
114 The SELinux process type zabbix_t can manage files labeled with the
115 following file types. The paths listed are the default paths for these
116 file types. Note the processes UID still need to have DAC permissions.
117
118 cluster_conf_t
119
120 /etc/cluster(/.*)?
121
122 cluster_var_lib_t
123
124 /var/lib/pcsd(/.*)?
125 /var/lib/cluster(/.*)?
126 /var/lib/openais(/.*)?
127 /var/lib/pengine(/.*)?
128 /var/lib/corosync(/.*)?
129 /usr/lib/heartbeat(/.*)?
130 /var/lib/heartbeat(/.*)?
131 /var/lib/pacemaker(/.*)?
132
133 cluster_var_run_t
134
135 /var/run/crm(/.*)?
136 /var/run/cman_.*
137 /var/run/rsctmp(/.*)?
138 /var/run/aisexec.*
139 /var/run/heartbeat(/.*)?
140 /var/run/pcsd-ruby.socket
141 /var/run/corosync-qnetd(/.*)?
142 /var/run/corosync-qdevice(/.*)?
143 /var/run/corosync.pid
144 /var/run/cpglockd.pid
145 /var/run/rgmanager.pid
146 /var/run/cluster/rgmanager.sk
147
148 faillog_t
149
150 /var/log/btmp.*
151 /var/log/faillog.*
152 /var/log/tallylog.*
153 /var/run/faillock(/.*)?
154
155 krb5_host_rcache_t
156
157 /var/tmp/krb5_0.rcache2
158 /var/cache/krb5rcache(/.*)?
159 /var/tmp/nfs_0
160 /var/tmp/DNS_25
161 /var/tmp/host_0
162 /var/tmp/imap_0
163 /var/tmp/HTTP_23
164 /var/tmp/HTTP_48
165 /var/tmp/ldap_55
166 /var/tmp/ldap_487
167 /var/tmp/ldapmap1_0
168
169 lastlog_t
170
171 /var/log/lastlog.*
172
173 root_t
174
175 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
176 /
177 /initrd
178
179 security_t
180
181 /selinux
182
183 zabbix_log_t
184
185 /var/log/zabbix.*
186
187 zabbix_tmp_t
188
189
190 zabbix_tmpfs_t
191
192
193 zabbix_var_lib_t
194
195 /var/lib/zabbix(/.*)?
196 /var/lib/zabbixsrv(/.*)?
197
198 zabbix_var_run_t
199
200 /var/run/zabbix(/.*)?
201
202
204 SELinux requires files to have an extended attribute to define the file
205 type.
206
207 You can see the context of a file using the -Z option to ls
208
209 Policy governs the access confined processes have to these files.
210 SELinux zabbix policy is very flexible allowing users to setup their
211 zabbix processes in as secure a method as possible.
212
213 EQUIVALENCE DIRECTORIES
214
215
216 zabbix policy stores data with multiple different file context types
217 under the /var/lib/zabbix directory. If you would like to store the
218 data in a different directory you can use the semanage command to cre‐
219 ate an equivalence mapping. If you wanted to store this data under the
220 /srv directory you would execute the following command:
221
222 semanage fcontext -a -e /var/lib/zabbix /srv/zabbix
223 restorecon -R -v /srv/zabbix
224
225 STANDARD FILE CONTEXT
226
227 SELinux defines the file context types for the zabbix, if you wanted to
228 store files with these types in a diffent paths, you need to execute
229 the semanage command to specify alternate labeling and then use re‐
230 storecon to put the labels on disk.
231
232 semanage fcontext -a -t zabbix_var_run_t '/srv/myzabbix_content(/.*)?'
233 restorecon -R -v /srv/myzabbix_content
234
235 Note: SELinux often uses regular expressions to specify labels that
236 match multiple files.
237
238 The following file types are defined for zabbix:
239
240
241
242 zabbix_agent_exec_t
243
244 - Set files with the zabbix_agent_exec_t type, if you want to transi‐
245 tion an executable to the zabbix_agent_t domain.
246
247
248 Paths:
249 /usr/bin/zabbix_agentd, /usr/sbin/zabbix_agentd
250
251
252 zabbix_agent_initrc_exec_t
253
254 - Set files with the zabbix_agent_initrc_exec_t type, if you want to
255 transition an executable to the zabbix_agent_initrc_t domain.
256
257
258
259 zabbix_exec_t
260
261 - Set files with the zabbix_exec_t type, if you want to transition an
262 executable to the zabbix_t domain.
263
264
265 Paths:
266 /usr/bin/zabbix_server, /usr/sbin/zabbix_proxy, /usr/sbin/zab‐
267 bix_server, /usr/sbin/zabbix_proxy_mysql, /usr/sbin/zab‐
268 bix_proxy_pgsql, /usr/sbin/zabbix_server_mysql, /usr/sbin/zab‐
269 bix_server_pgsql, /usr/sbin/zabbix_proxy_sqlite3, /usr/sbin/zab‐
270 bix_server_sqlite3
271
272
273 zabbix_initrc_exec_t
274
275 - Set files with the zabbix_initrc_exec_t type, if you want to transi‐
276 tion an executable to the zabbix_initrc_t domain.
277
278
279
280 zabbix_log_t
281
282 - Set files with the zabbix_log_t type, if you want to treat the data
283 as zabbix log data, usually stored under the /var/log directory.
284
285
286
287 zabbix_script_exec_t
288
289 - Set files with the zabbix_script_exec_t type, if you want to transi‐
290 tion an executable to the zabbix_script_t domain.
291
292
293 Paths:
294 /usr/lib/zabbix/externalscripts(/.*)?, /var/lib/zabbix/exter‐
295 nalscripts(/.*)?
296
297
298 zabbix_tmp_t
299
300 - Set files with the zabbix_tmp_t type, if you want to store zabbix
301 temporary files in the /tmp directories.
302
303
304
305 zabbix_tmpfs_t
306
307 - Set files with the zabbix_tmpfs_t type, if you want to store zabbix
308 files on a tmpfs file system.
309
310
311
312 zabbix_var_lib_t
313
314 - Set files with the zabbix_var_lib_t type, if you want to store the
315 zabbix files under the /var/lib directory.
316
317
318 Paths:
319 /var/lib/zabbix(/.*)?, /var/lib/zabbixsrv(/.*)?
320
321
322 zabbix_var_run_t
323
324 - Set files with the zabbix_var_run_t type, if you want to store the
325 zabbix files under the /run or /var/run directory.
326
327
328
329 zabbixd_var_lib_t
330
331 - Set files with the zabbixd_var_lib_t type, if you want to store the
332 zabbixd files under the /var/lib directory.
333
334
335
336 Note: File context can be temporarily modified with the chcon command.
337 If you want to permanently change the file context you need to use the
338 semanage fcontext command. This will modify the SELinux labeling data‐
339 base. You will need to use restorecon to apply the labels.
340
341
343 semanage fcontext can also be used to manipulate default file context
344 mappings.
345
346 semanage permissive can also be used to manipulate whether or not a
347 process type is permissive.
348
349 semanage module can also be used to enable/disable/install/remove pol‐
350 icy modules.
351
352 semanage port can also be used to manipulate the port definitions
353
354 semanage boolean can also be used to manipulate the booleans
355
356
357 system-config-selinux is a GUI tool available to customize SELinux pol‐
358 icy settings.
359
360
362 This manual page was auto-generated using sepolicy manpage .
363
364
366 selinux(8), zabbix(8), semanage(8), restorecon(8), chcon(1), sepol‐
367 icy(8), setsebool(8), zabbix_agent_selinux(8), zabbix_agent_selinux(8),
368 zabbix_script_selinux(8), zabbix_script_selinux(8)
369
370
371
372zabbix 22-05-27 zabbix_selinux(8)