1ipsec_selinux(8)             SELinux Policy ipsec             ipsec_selinux(8)
2
3
4

NAME

6       ipsec_selinux - Security Enhanced Linux Policy for the ipsec processes
7

DESCRIPTION

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

ENTRYPOINTS

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/strongimcv/.*,                 /usr/libexec/strongswan/.*,
28       /usr/lib/ipsec/spi,     /usr/lib/ipsec/pluto,    /usr/lib/ipsec/eroute,
29       /usr/libexec/ipsec/spi, /usr/libexec/ipsec/pluto, /usr/sbin/charon-sys‐
30       temd,       /usr/lib/ipsec/klipsdebug,       /usr/libexec/ipsec/eroute,
31       /usr/libexec/ipsec/addconn, /usr/libexec/ipsec/klipsdebug
32

PROCESS TYPES

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

BOOLEANS

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 dontaudit all  daemons  scheduling  requests  (setsched,
61       sys_nice),  you  must turn on the daemons_dontaudit_scheduling boolean.
62       Enabled by default.
63
64       setsebool -P daemons_dontaudit_scheduling 1
65
66
67
68       If you want to allow all domains to execute in fips_mode, you must turn
69       on the fips_mode boolean. Enabled by default.
70
71       setsebool -P fips_mode 1
72
73
74
75       If  you  want  to allow confined applications to run with kerberos, you
76       must turn on the kerberos_enabled boolean. Enabled by default.
77
78       setsebool -P kerberos_enabled 1
79
80
81
82       If you want to allow system to run with  NIS,  you  must  turn  on  the
83       nis_enabled boolean. Disabled by default.
84
85       setsebool -P nis_enabled 1
86
87
88

PORT TYPES

90       SELinux defines port types to represent TCP and UDP ports.
91
92       You  can  see  the  types associated with a port by using the following
93       command:
94
95       semanage port -l
96
97
98       Policy governs the access  confined  processes  have  to  these  ports.
99       SELinux  ipsec  policy  is  very flexible allowing users to setup their
100       ipsec processes in as secure a method as possible.
101
102       The following port types are defined for ipsec:
103
104
105       ipsecnat_port_t
106
107
108
109       Default Defined Ports:
110                 tcp 4500
111                 udp 4500
112

MANAGED FILES

114       The SELinux process type ipsec_t can manage files labeled with the fol‐
115       lowing  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       ipsec_conf_file_t
156
157            /etc/racoon(/.*)?
158            /etc/strongimcv(/.*)?
159            /etc/strongswan(/.*)?
160            /etc/ipsec.conf
161            /etc/strongswan/ipsec.conf
162
163       ipsec_key_file_t
164
165            /etc/ipsec.d(/.*)?
166            /etc/racoon/certs(/.*)?
167            /etc/ipsec.secrets.*
168            /var/lib/ipsec/nss(/.*)?
169            /etc/strongswan/ipsec.d(/.*)?
170            /etc/strongswan/swanctl/rsa(/.*)?
171            /etc/strongswan/swanctl/pkcs.*
172            /etc/strongswan/swanctl/x509.*
173            /etc/strongswan/ipsec.secrets.*
174            /etc/strongswan/swanctl/ecdsa(/.*)?
175            /etc/strongswan/swanctl/bliss/(/.*)?
176            /etc/strongswan/swanctl/pubkey(/.*)?
177            /etc/strongswan/swanctl/private(/.*)?
178            /etc/racoon/psk.txt
179
180       ipsec_log_t
181
182            /var/log/pluto.log.*
183
184       ipsec_tmp_t
185
186
187       ipsec_var_run_t
188
189            /var/racoon(/.*)?
190            /var/run/pluto(/.*)?
191            /var/run/charon.*
192            /var/run/strongswan(/.*)?
193            /var/run/racoon.pid
194            /var/run/charon.ctl
195            /var/run/charon.dck
196            /var/run/charon.vici
197
198       krb5_host_rcache_t
199
200            /var/tmp/krb5_0.rcache2
201            /var/cache/krb5rcache(/.*)?
202            /var/tmp/nfs_0
203            /var/tmp/DNS_25
204            /var/tmp/host_0
205            /var/tmp/imap_0
206            /var/tmp/HTTP_23
207            /var/tmp/HTTP_48
208            /var/tmp/ldap_55
209            /var/tmp/ldap_487
210            /var/tmp/ldapmap1_0
211
212       lastlog_t
213
214            /var/log/lastlog.*
215
216       named_cache_t
217
218            /var/named/data(/.*)?
219            /var/lib/softhsm(/.*)?
220            /var/lib/unbound(/.*)?
221            /var/named/slaves(/.*)?
222            /var/named/dynamic(/.*)?
223            /var/named/chroot/var/tmp(/.*)?
224            /var/named/chroot/var/named/data(/.*)?
225            /var/named/chroot/var/named/slaves(/.*)?
226            /var/named/chroot/var/named/dynamic(/.*)?
227
228       pkcs_slotd_lock_t
229
230            /var/lock/opencryptoki(/.*)?
231
232       pkcs_slotd_tmpfs_t
233
234            /dev/shm/var.lib.opencryptoki.*
235
236       pkcs_slotd_var_lib_t
237
238            /var/lib/opencryptoki(/.*)?
239
240       root_t
241
242            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
243            /
244            /initrd
245
246       security_t
247
248            /selinux
249
250

FILE CONTEXTS

252       SELinux requires files to have an extended attribute to define the file
253       type.
254
255       You can see the context of a file using the -Z option to ls
256
257       Policy  governs  the  access  confined  processes  have to these files.
258       SELinux ipsec policy is very flexible allowing  users  to  setup  their
259       ipsec processes in as secure a method as possible.
260
261       EQUIVALENCE DIRECTORIES
262
263
264       ipsec policy stores data with multiple different file context types un‐
265       der the /var/run/pluto directory.  If you would like to store the  data
266       in  a different directory you can use the semanage command to create an
267       equivalence mapping.  If you wanted to store this data under  the  /srv
268       directory you would execute the following command:
269
270       semanage fcontext -a -e /var/run/pluto /srv/pluto
271       restorecon -R -v /srv/pluto
272
273       STANDARD FILE CONTEXT
274
275       SELinux  defines the file context types for the ipsec, if you wanted to
276       store files with these types in a different paths, you need to  execute
277       the  semanage  command  to  specify alternate labeling and then use re‐
278       storecon to put the labels on disk.
279
280       semanage fcontext -a -t ipsec_exec_t '/srv/ipsec/content(/.*)?'
281       restorecon -R -v /srv/myipsec_content
282
283       Note: SELinux often uses regular expressions  to  specify  labels  that
284       match multiple files.
285
286       The following file types are defined for ipsec:
287
288
289
290       ipsec_conf_file_t
291
292       -  Set  files with the ipsec_conf_file_t type, if you want to treat the
293       files as ipsec conf content.
294
295
296       Paths:
297            /etc/racoon(/.*)?,  /etc/strongimcv(/.*)?,  /etc/strongswan(/.*)?,
298            /etc/ipsec.conf, /etc/strongswan/ipsec.conf
299
300
301       ipsec_exec_t
302
303       -  Set  files  with the ipsec_exec_t type, if you want to transition an
304       executable to the ipsec_t domain.
305
306
307       Paths:
308            /usr/libexec/strongimcv/.*,            /usr/libexec/strongswan/.*,
309            /usr/lib/ipsec/spi,  /usr/lib/ipsec/pluto,  /usr/lib/ipsec/eroute,
310            /usr/libexec/ipsec/spi,                  /usr/libexec/ipsec/pluto,
311            /usr/sbin/charon-systemd,               /usr/lib/ipsec/klipsdebug,
312            /usr/libexec/ipsec/eroute,             /usr/libexec/ipsec/addconn,
313            /usr/libexec/ipsec/klipsdebug
314
315
316       ipsec_initrc_exec_t
317
318       -  Set  files with the ipsec_initrc_exec_t type, if you want to transi‐
319       tion an executable to the ipsec_initrc_t domain.
320
321
322       Paths:
323            /etc/rc.d/init.d/ipsec,                   /etc/rc.d/init.d/racoon,
324            /etc/rc.d/init.d/strongswan
325
326
327       ipsec_key_file_t
328
329       -  Set  files  with the ipsec_key_file_t type, if you want to treat the
330       files as ipsec key content.
331
332
333       Paths:
334            /etc/ipsec.d(/.*)?, /etc/racoon/certs(/.*)?, /etc/ipsec.secrets.*,
335            /var/lib/ipsec/nss(/.*)?,           /etc/strongswan/ipsec.d(/.*)?,
336            /etc/strongswan/swanctl/rsa(/.*)?, /etc/strongswan/swanctl/pkcs.*,
337            /etc/strongswan/swanctl/x509.*,   /etc/strongswan/ipsec.secrets.*,
338            /etc/strongswan/swanctl/ecdsa(/.*)?,
339            /etc/strongswan/swanctl/bliss/(/.*)?, /etc/strongswan/swanctl/pub‐
340            key(/.*)?,                  /etc/strongswan/swanctl/private(/.*)?,
341            /etc/racoon/psk.txt
342
343
344       ipsec_log_t
345
346       - Set files with the ipsec_log_t type, if you want to treat the data as
347       ipsec log data, usually stored under the /var/log directory.
348
349
350
351       ipsec_mgmt_devpts_t
352
353       - Set files with the ipsec_mgmt_devpts_t type, if you want to treat the
354       files as ipsec mgmt devpts data.
355
356
357
358       ipsec_mgmt_exec_t
359
360       -  Set files with the ipsec_mgmt_exec_t type, if you want to transition
361       an executable to the ipsec_mgmt_t domain.
362
363
364       Paths:
365            /usr/sbin/ipsec,     /usr/sbin/swanctl,      /usr/sbin/strongimcv,
366            /usr/sbin/strongswan,                    /usr/lib/ipsec/_plutorun,
367            /usr/lib/ipsec/_plutoload,           /usr/libexec/ipsec/_plutorun,
368            /usr/libexec/ipsec/_plutoload,   /usr/libexec/nm-openswan-service,
369            /usr/libexec/nm-libreswan-service
370
371
372       ipsec_mgmt_lock_t
373
374       - Set files with the ipsec_mgmt_lock_t type, if you want to  treat  the
375       files as ipsec mgmt lock data, stored under the /var/lock directory
376
377
378       Paths:
379            /var/lock/subsys/ipsec, /var/lock/subsys/strongswan
380
381
382       ipsec_mgmt_unit_file_t
383
384       -  Set files with the ipsec_mgmt_unit_file_t type, if you want to treat
385       the files as ipsec mgmt unit content.
386
387
388       Paths:
389            /usr/lib/systemd/system/ipsec.*,             /usr/lib/systemd/sys‐
390            tem/strongimcv.*,            /usr/lib/systemd/system/strongswan.*,
391            /usr/lib/systemd/system/strongswan-swanctl.*
392
393
394       ipsec_mgmt_var_run_t
395
396       - Set files with the ipsec_mgmt_var_run_t type, if you  want  to  store
397       the ipsec mgmt files under the /run or /var/run directory.
398
399
400       Paths:
401            /var/run/pluto/ipsec.info, /var/run/pluto/ipsec_setup.pid
402
403
404       ipsec_tmp_t
405
406       -  Set files with the ipsec_tmp_t type, if you want to store ipsec tem‐
407       porary files in the /tmp directories.
408
409
410
411       ipsec_var_run_t
412
413       - Set files with the ipsec_var_run_t type, if you  want  to  store  the
414       ipsec files under the /run or /var/run directory.
415
416
417       Paths:
418            /var/racoon(/.*)?,     /var/run/pluto(/.*)?,    /var/run/charon.*,
419            /var/run/strongswan(/.*)?,                    /var/run/racoon.pid,
420            /var/run/charon.ctl, /var/run/charon.dck, /var/run/charon.vici
421
422
423       Note:  File context can be temporarily modified with the chcon command.
424       If you want to permanently change the file context you need to use  the
425       semanage fcontext command.  This will modify the SELinux labeling data‐
426       base.  You will need to use restorecon to apply the labels.
427
428

COMMANDS

430       semanage fcontext can also be used to manipulate default  file  context
431       mappings.
432
433       semanage  permissive  can  also  be used to manipulate whether or not a
434       process type is permissive.
435
436       semanage module can also be used to enable/disable/install/remove  pol‐
437       icy modules.
438
439       semanage port can also be used to manipulate the port definitions
440
441       semanage boolean can also be used to manipulate the booleans
442
443
444       system-config-selinux is a GUI tool available to customize SELinux pol‐
445       icy settings.
446
447

AUTHOR

449       This manual page was auto-generated using sepolicy manpage .
450
451

SEE ALSO

453       selinux(8),  ipsec(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
454       icy(8), setsebool(8), ipsec_mgmt_selinux(8), ipsec_mgmt_selinux(8)
455
456
457
458ipsec                              23-10-20                   ipsec_selinux(8)
Impressum