1ipsec_selinux(8) SELinux Policy ipsec ipsec_selinux(8)
2
3
4
6 ipsec_selinux - Security Enhanced Linux Policy for the ipsec processes
7
9 Security-Enhanced Linux secures the ipsec processes via flexible manda‐
10 tory access control.
11
12 The ipsec processes execute with the ipsec_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep ipsec_t
19
20
21
23 The ipsec_t SELinux type can be entered via the ipsec_exec_t file type.
24
25 The default entrypoint paths for the ipsec_t domain are the following:
26
27 /usr/libexec/strongswan/.*, /usr/libexec/strongimcv/.*,
28 /usr/lib/ipsec/spi, /usr/lib/ipsec/pluto, /usr/lib/ipsec/eroute,
29 /usr/libexec/ipsec/spi, /usr/libexec/ipsec/pluto, /usr/lib/ipsec/klips‐
30 debug, /usr/libexec/ipsec/eroute, /usr/libexec/ipsec/addconn,
31 /usr/libexec/ipsec/klipsdebug
32
34 SELinux defines process types (domains) for each process running on the
35 system
36
37 You can see the context of a process using the -Z option to ps
38
39 Policy governs the access confined processes have to files. SELinux
40 ipsec policy is very flexible allowing users to setup their ipsec pro‐
41 cesses in as secure a method as possible.
42
43 The following process types are defined for ipsec:
44
45 ipsec_t, ipsec_mgmt_t
46
47 Note: semanage permissive -a ipsec_t can be used to make the process
48 type ipsec_t permissive. SELinux does not deny access to permissive
49 process types, but the AVC (SELinux denials) messages are still gener‐
50 ated.
51
52
54 SELinux policy is customizable based on least access required. ipsec
55 policy is extremely flexible and has several booleans that allow you to
56 manipulate the policy and run ipsec with the tightest access possible.
57
58
59
60 If you want to allow users to resolve user passwd entries directly from
61 ldap rather then using a sssd server, you must turn on the authlo‐
62 gin_nsswitch_use_ldap boolean. Disabled by default.
63
64 setsebool -P authlogin_nsswitch_use_ldap 1
65
66
67
68 If you want to allow all daemons to write corefiles to /, you must turn
69 on the daemons_dump_core boolean. Disabled by default.
70
71 setsebool -P daemons_dump_core 1
72
73
74
75 If you want to enable cluster mode for daemons, you must turn on the
76 daemons_enable_cluster_mode boolean. Enabled by default.
77
78 setsebool -P daemons_enable_cluster_mode 1
79
80
81
82 If you want to allow all daemons to use tcp wrappers, you must turn on
83 the daemons_use_tcp_wrapper boolean. Disabled by default.
84
85 setsebool -P daemons_use_tcp_wrapper 1
86
87
88
89 If you want to allow all daemons the ability to read/write terminals,
90 you must turn on the daemons_use_tty boolean. Disabled by default.
91
92 setsebool -P daemons_use_tty 1
93
94
95
96 If you want to deny any process from ptracing or debugging any other
97 processes, you must turn on the deny_ptrace boolean. Enabled by
98 default.
99
100 setsebool -P deny_ptrace 1
101
102
103
104 If you want to allow any process to mmap any file on system with
105 attribute file_type, you must turn on the domain_can_mmap_files bool‐
106 ean. Enabled by default.
107
108 setsebool -P domain_can_mmap_files 1
109
110
111
112 If you want to allow all domains write to kmsg_device, while kernel is
113 executed with systemd.log_target=kmsg parameter, you must turn on the
114 domain_can_write_kmsg boolean. Disabled by default.
115
116 setsebool -P domain_can_write_kmsg 1
117
118
119
120 If you want to allow all domains to use other domains file descriptors,
121 you must turn on the domain_fd_use boolean. Enabled by default.
122
123 setsebool -P domain_fd_use 1
124
125
126
127 If you want to allow all domains to have the kernel load modules, you
128 must turn on the domain_kernel_load_modules boolean. Disabled by
129 default.
130
131 setsebool -P domain_kernel_load_modules 1
132
133
134
135 If you want to allow all domains to execute in fips_mode, you must turn
136 on the fips_mode boolean. Enabled by default.
137
138 setsebool -P fips_mode 1
139
140
141
142 If you want to enable reading of urandom for all domains, you must turn
143 on the global_ssp boolean. Disabled by default.
144
145 setsebool -P global_ssp 1
146
147
148
149 If you want to allow confined applications to run with kerberos, you
150 must turn on the kerberos_enabled boolean. Enabled by default.
151
152 setsebool -P kerberos_enabled 1
153
154
155
156 If you want to allow system to run with NIS, you must turn on the
157 nis_enabled boolean. Disabled by default.
158
159 setsebool -P nis_enabled 1
160
161
162
163 If you want to allow confined applications to use nscd shared memory,
164 you must turn on the nscd_use_shm boolean. Disabled by default.
165
166 setsebool -P nscd_use_shm 1
167
168
169
171 SELinux defines port types to represent TCP and UDP ports.
172
173 You can see the types associated with a port by using the following
174 command:
175
176 semanage port -l
177
178
179 Policy governs the access confined processes have to these ports.
180 SELinux ipsec policy is very flexible allowing users to setup their
181 ipsec processes in as secure a method as possible.
182
183 The following port types are defined for ipsec:
184
185
186 ipsecnat_port_t
187
188
189
190 Default Defined Ports:
191 tcp 4500
192 udp 4500
193
195 The SELinux process type ipsec_t can manage files labeled with the fol‐
196 lowing file types. The paths listed are the default paths for these
197 file types. Note the processes UID still need to have DAC permissions.
198
199 cluster_conf_t
200
201 /etc/cluster(/.*)?
202
203 cluster_var_lib_t
204
205 /var/lib/pcsd(/.*)?
206 /var/lib/cluster(/.*)?
207 /var/lib/openais(/.*)?
208 /var/lib/pengine(/.*)?
209 /var/lib/corosync(/.*)?
210 /usr/lib/heartbeat(/.*)?
211 /var/lib/heartbeat(/.*)?
212 /var/lib/pacemaker(/.*)?
213
214 cluster_var_run_t
215
216 /var/run/crm(/.*)?
217 /var/run/cman_.*
218 /var/run/rsctmp(/.*)?
219 /var/run/aisexec.*
220 /var/run/heartbeat(/.*)?
221 /var/run/corosync-qnetd(/.*)?
222 /var/run/corosync-qdevice(/.*)?
223 /var/run/cpglockd.pid
224 /var/run/corosync.pid
225 /var/run/rgmanager.pid
226 /var/run/cluster/rgmanager.sk
227
228 faillog_t
229
230 /var/log/btmp.*
231 /var/log/faillog.*
232 /var/log/tallylog.*
233 /var/run/faillock(/.*)?
234
235 ipsec_conf_file_t
236
237 /etc/racoon(/.*)?
238 /etc/strongswan(/.*)?
239 /etc/strongimcv(/.*)?
240 /etc/ipsec.conf
241 /etc/strongswan/ipsec.conf
242
243 ipsec_key_file_t
244
245 /etc/ipsec.d(/.*)?
246 /etc/racoon/certs(/.*)?
247 /etc/ipsec.secrets.*
248 /etc/strongswan/ipsec.d(/.*)?
249 /etc/strongswan/ipsec.secrets.*
250 /etc/racoon/psk.txt
251
252 ipsec_log_t
253
254 /var/log/pluto.log.*
255
256 ipsec_tmp_t
257
258
259 ipsec_var_run_t
260
261 /var/racoon(/.*)?
262 /var/run/pluto(/.*)?
263 /var/run/charon.*
264 /var/run/racoon.pid
265 /var/run/charon.ctl
266 /var/run/charon.vici
267
268 krb5_host_rcache_t
269
270 /var/cache/krb5rcache(/.*)?
271 /var/tmp/nfs_0
272 /var/tmp/DNS_25
273 /var/tmp/host_0
274 /var/tmp/imap_0
275 /var/tmp/HTTP_23
276 /var/tmp/HTTP_48
277 /var/tmp/ldap_55
278 /var/tmp/ldap_487
279 /var/tmp/ldapmap1_0
280
281 lastlog_t
282
283 /var/log/lastlog.*
284
285 net_conf_t
286
287 /etc/hosts[^/]*
288 /etc/yp.conf.*
289 /etc/denyhosts.*
290 /etc/hosts.deny.*
291 /etc/resolv.conf.*
292 /etc/.resolv.conf.*
293 /etc/resolv-secure.conf.*
294 /var/run/systemd/network(/.*)?
295 /etc/sysconfig/networking(/.*)?
296 /etc/sysconfig/network-scripts(/.*)?
297 /etc/sysconfig/network-scripts/.*resolv.conf
298 /var/run/NetworkManager/resolv.conf.*
299 /etc/ethers
300 /etc/ntp.conf
301 /var/run/systemd/resolve/resolv.conf
302
303 root_t
304
305 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
306 /
307 /initrd
308
309 security_t
310
311 /selinux
312
313
315 SELinux requires files to have an extended attribute to define the file
316 type.
317
318 You can see the context of a file using the -Z option to ls
319
320 Policy governs the access confined processes have to these files.
321 SELinux ipsec policy is very flexible allowing users to setup their
322 ipsec processes in as secure a method as possible.
323
324 EQUIVALENCE DIRECTORIES
325
326
327 ipsec policy stores data with multiple different file context types
328 under the /var/run/pluto directory. If you would like to store the
329 data in a different directory you can use the semanage command to cre‐
330 ate an equivalence mapping. If you wanted to store this data under the
331 /srv dirctory you would execute the following command:
332
333 semanage fcontext -a -e /var/run/pluto /srv/pluto
334 restorecon -R -v /srv/pluto
335
336 STANDARD FILE CONTEXT
337
338 SELinux defines the file context types for the ipsec, if you wanted to
339 store files with these types in a diffent paths, you need to execute
340 the semanage command to sepecify alternate labeling and then use
341 restorecon to put the labels on disk.
342
343 semanage fcontext -a -t ipsec_var_run_t '/srv/myipsec_content(/.*)?'
344 restorecon -R -v /srv/myipsec_content
345
346 Note: SELinux often uses regular expressions to specify labels that
347 match multiple files.
348
349 The following file types are defined for ipsec:
350
351
352
353 ipsec_conf_file_t
354
355 - Set files with the ipsec_conf_file_t type, if you want to treat the
356 files as ipsec conf content.
357
358
359 Paths:
360 /etc/racoon(/.*)?, /etc/strongswan(/.*)?, /etc/strongimcv(/.*)?,
361 /etc/ipsec.conf, /etc/strongswan/ipsec.conf
362
363
364 ipsec_exec_t
365
366 - Set files with the ipsec_exec_t type, if you want to transition an
367 executable to the ipsec_t domain.
368
369
370 Paths:
371 /usr/libexec/strongswan/.*, /usr/libexec/strongimcv/.*,
372 /usr/lib/ipsec/spi, /usr/lib/ipsec/pluto, /usr/lib/ipsec/eroute,
373 /usr/libexec/ipsec/spi, /usr/libexec/ipsec/pluto,
374 /usr/lib/ipsec/klipsdebug, /usr/libexec/ipsec/eroute,
375 /usr/libexec/ipsec/addconn, /usr/libexec/ipsec/klipsdebug
376
377
378 ipsec_initrc_exec_t
379
380 - Set files with the ipsec_initrc_exec_t type, if you want to transi‐
381 tion an executable to the ipsec_initrc_t domain.
382
383
384 Paths:
385 /etc/rc.d/init.d/ipsec, /etc/rc.d/init.d/racoon,
386 /etc/rc.d/init.d/strongswan
387
388
389 ipsec_key_file_t
390
391 - Set files with the ipsec_key_file_t type, if you want to treat the
392 files as ipsec key content.
393
394
395 Paths:
396 /etc/ipsec.d(/.*)?, /etc/racoon/certs(/.*)?, /etc/ipsec.secrets.*,
397 /etc/strongswan/ipsec.d(/.*)?, /etc/strongswan/ipsec.secrets.*,
398 /etc/racoon/psk.txt
399
400
401 ipsec_log_t
402
403 - Set files with the ipsec_log_t type, if you want to treat the data as
404 ipsec log data, usually stored under the /var/log directory.
405
406
407
408 ipsec_mgmt_devpts_t
409
410 - Set files with the ipsec_mgmt_devpts_t type, if you want to treat the
411 files as ipsec mgmt devpts data.
412
413
414
415 ipsec_mgmt_exec_t
416
417 - Set files with the ipsec_mgmt_exec_t type, if you want to transition
418 an executable to the ipsec_mgmt_t domain.
419
420
421 Paths:
422 /usr/sbin/ipsec, /usr/sbin/swanctl, /usr/sbin/strongswan,
423 /usr/sbin/strongimcv, /usr/lib/ipsec/_plutorun,
424 /usr/lib/ipsec/_plutoload, /usr/libexec/ipsec/_plutorun,
425 /usr/libexec/ipsec/_plutoload, /usr/libexec/nm-openswan-service,
426 /usr/libexec/nm-libreswan-service
427
428
429 ipsec_mgmt_lock_t
430
431 - Set files with the ipsec_mgmt_lock_t type, if you want to treat the
432 files as ipsec mgmt lock data, stored under the /var/lock directory
433
434
435 Paths:
436 /var/lock/subsys/ipsec, /var/lock/subsys/strongswan
437
438
439 ipsec_mgmt_unit_file_t
440
441 - Set files with the ipsec_mgmt_unit_file_t type, if you want to treat
442 the files as ipsec mgmt unit content.
443
444
445 Paths:
446 /usr/lib/systemd/system/ipsec.*, /usr/lib/systemd/sys‐
447 tem/strongswan.*, /usr/lib/systemd/system/strongimcv.*,
448 /usr/lib/systemd/system/strongswan-swanctl.*
449
450
451 ipsec_mgmt_var_run_t
452
453 - Set files with the ipsec_mgmt_var_run_t type, if you want to store
454 the ipsec mgmt files under the /run or /var/run directory.
455
456
457 Paths:
458 /var/run/pluto/ipsec.info, /var/run/pluto/ipsec_setup.pid
459
460
461 ipsec_tmp_t
462
463 - Set files with the ipsec_tmp_t type, if you want to store ipsec tem‐
464 porary files in the /tmp directories.
465
466
467
468 ipsec_var_run_t
469
470 - Set files with the ipsec_var_run_t type, if you want to store the
471 ipsec files under the /run or /var/run directory.
472
473
474 Paths:
475 /var/racoon(/.*)?, /var/run/pluto(/.*)?, /var/run/charon.*,
476 /var/run/racoon.pid, /var/run/charon.ctl, /var/run/charon.vici
477
478
479 Note: File context can be temporarily modified with the chcon command.
480 If you want to permanently change the file context you need to use the
481 semanage fcontext command. This will modify the SELinux labeling data‐
482 base. You will need to use restorecon to apply the labels.
483
484
486 semanage fcontext can also be used to manipulate default file context
487 mappings.
488
489 semanage permissive can also be used to manipulate whether or not a
490 process type is permissive.
491
492 semanage module can also be used to enable/disable/install/remove pol‐
493 icy modules.
494
495 semanage port can also be used to manipulate the port definitions
496
497 semanage boolean can also be used to manipulate the booleans
498
499
500 system-config-selinux is a GUI tool available to customize SELinux pol‐
501 icy settings.
502
503
505 This manual page was auto-generated using sepolicy manpage .
506
507
509 selinux(8), ipsec(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
510 , setsebool(8), ipsec_mgmt_selinux(8), ipsec_mgmt_selinux(8)
511
512
513
514ipsec 19-04-25 ipsec_selinux(8)