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/lib(64)?/ipsec/spi, /usr/lib(64)?/ipsec/pluto,
28 /usr/lib(64)?/ipsec/eroute, /usr/lib(64)?/ipsec/klipsdebug,
29 /usr/local/lib(64)?/ipsec/spi, /usr/local/lib(64)?/ipsec/pluto,
30 /usr/local/lib(64)?/ipsec/eroute, /usr/local/lib(64)?/ipsec/klipsdebug,
31 /usr/libexec/strongswan/.*, /usr/libexec/ipsec/spi,
32 /usr/libexec/ipsec/pluto, /usr/libexec/ipsec/eroute,
33 /usr/libexec/ipsec/klipsdebug
34
36 SELinux defines process types (domains) for each process running on the
37 system
38
39 You can see the context of a process using the -Z option to ps
40
41 Policy governs the access confined processes have to files. SELinux
42 ipsec policy is very flexible allowing users to setup their ipsec pro‐
43 cesses in as secure a method as possible.
44
45 The following process types are defined for ipsec:
46
47 ipsec_t, ipsec_mgmt_t
48
49 Note: semanage permissive -a ipsec_t can be used to make the process
50 type ipsec_t permissive. SELinux does not deny access to permissive
51 process types, but the AVC (SELinux denials) messages are still gener‐
52 ated.
53
54
56 SELinux policy is customizable based on least access required. ipsec
57 policy is extremely flexible and has several booleans that allow you to
58 manipulate the policy and run ipsec with the tightest access possible.
59
60
61
62 If you want to allow all daemons to write corefiles to /, you must turn
63 on the allow_daemons_dump_core boolean. Disabled by default.
64
65 setsebool -P allow_daemons_dump_core 1
66
67
68
69 If you want to allow all daemons to use tcp wrappers, you must turn on
70 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
71
72 setsebool -P allow_daemons_use_tcp_wrapper 1
73
74
75
76 If you want to allow all daemons the ability to read/write terminals,
77 you must turn on the allow_daemons_use_tty boolean. Disabled by
78 default.
79
80 setsebool -P allow_daemons_use_tty 1
81
82
83
84 If you want to allow all domains to use other domains file descriptors,
85 you must turn on the allow_domain_fd_use boolean. Enabled by default.
86
87 setsebool -P allow_domain_fd_use 1
88
89
90
91 If you want to allow confined applications to run with kerberos, you
92 must turn on the allow_kerberos boolean. Enabled by default.
93
94 setsebool -P allow_kerberos 1
95
96
97
98 If you want to allow sysadm to debug or ptrace all processes, you must
99 turn on the allow_ptrace boolean. Disabled by default.
100
101 setsebool -P allow_ptrace 1
102
103
104
105 If you want to allow system to run with NIS, you must turn on the
106 allow_ypbind boolean. Disabled by default.
107
108 setsebool -P allow_ypbind 1
109
110
111
112 If you want to enable cluster mode for daemons, you must turn on the
113 daemons_enable_cluster_mode boolean. Disabled by default.
114
115 setsebool -P daemons_enable_cluster_mode 1
116
117
118
119 If you want to allow all domains to have the kernel load modules, you
120 must turn on the domain_kernel_load_modules boolean. Disabled by
121 default.
122
123 setsebool -P domain_kernel_load_modules 1
124
125
126
127 If you want to allow all domains to execute in fips_mode, you must turn
128 on the fips_mode boolean. Enabled by default.
129
130 setsebool -P fips_mode 1
131
132
133
134 If you want to enable reading of urandom for all domains, you must turn
135 on the global_ssp boolean. Disabled by default.
136
137 setsebool -P global_ssp 1
138
139
140
141 If you want to enable support for upstart as the init program, you must
142 turn on the init_upstart boolean. Enabled by default.
143
144 setsebool -P init_upstart 1
145
146
147
148 If you want to allow confined applications to use nscd shared memory,
149 you must turn on the nscd_use_shm boolean. Enabled by default.
150
151 setsebool -P nscd_use_shm 1
152
153
154
156 SELinux defines port types to represent TCP and UDP ports.
157
158 You can see the types associated with a port by using the following
159 command:
160
161 semanage port -l
162
163
164 Policy governs the access confined processes have to these ports.
165 SELinux ipsec policy is very flexible allowing users to setup their
166 ipsec processes in as secure a method as possible.
167
168 The following port types are defined for ipsec:
169
170
171 ipsecnat_port_t
172
173
174
175 Default Defined Ports:
176 tcp 4500
177 udp 4500
178
180 The SELinux process type ipsec_t can manage files labeled with the fol‐
181 lowing file types. The paths listed are the default paths for these
182 file types. Note the processes UID still need to have DAC permissions.
183
184 cluster_conf_t
185
186 /etc/cluster(/.*)?
187
188 cluster_var_lib_t
189
190 /var/lib(64)?/openais(/.*)?
191 /var/lib(64)?/pengine(/.*)?
192 /var/lib(64)?/corosync(/.*)?
193 /usr/lib(64)?/heartbeat(/.*)?
194 /var/lib(64)?/heartbeat(/.*)?
195 /var/lib(64)?/pacemaker(/.*)?
196 /var/lib/cluster(/.*)?
197
198 cluster_var_run_t
199
200 /var/run/crm(/.*)?
201 /var/run/cman_.*
202 /var/run/rsctmp(/.*)?
203 /var/run/aisexec.*
204 /var/run/heartbeat(/.*)?
205 /var/run/cpglockd.pid
206 /var/run/corosync.pid
207 /var/run/rgmanager.pid
208 /var/run/cluster/rgmanager.sk
209
210 initrc_tmp_t
211
212
213 ipsec_key_file_t
214
215 /etc/ipsec.d(/.*)?
216 /etc/racoon/certs(/.*)?
217 /etc/strongswan/ipsec.d(/.*)?
218 /etc/strongswan/ipsec.secrets.*
219 /etc/ipsec.secrets
220 /etc/racoon/psk.txt
221
222 ipsec_tmp_t
223
224
225 ipsec_var_run_t
226
227 /var/racoon(/.*)?
228 /var/run/pluto(/.*)?
229 /var/run/charon.pid
230 /var/run/charon.ctl
231 /var/run/racoon.pid
232
233 mnt_t
234
235 /mnt(/[^/]*)
236 /mnt(/[^/]*)?
237 /rhev(/[^/]*)?
238 /media(/[^/]*)
239 /media(/[^/]*)?
240 /etc/rhgb(/.*)?
241 /media/.hal-.*
242 /net
243 /afs
244 /rhev
245 /misc
246
247 net_conf_t
248
249 /etc/ntpd?.conf.*
250 /etc/yp.conf.*
251 /etc/denyhosts.*
252 /etc/hosts.deny.*
253 /etc/resolv.conf.*
254 /etc/ntp/step-tickers.*
255 /etc/sysconfig/networking(/.*)?
256 /etc/sysconfig/network-scripts(/.*)?
257 /etc/sysconfig/network-scripts/.*resolv.conf
258 /etc/hosts
259 /etc/ethers
260
261 root_t
262
263 /
264 /initrd
265
266 security_t
267
268
269 tmp_t
270
271 /tmp
272 /usr/tmp
273 /var/tmp
274 /tmp-inst
275 /var/tmp-inst
276 /var/tmp/vi.recover
277
278
280 SELinux requires files to have an extended attribute to define the file
281 type.
282
283 You can see the context of a file using the -Z option to ls
284
285 Policy governs the access confined processes have to these files.
286 SELinux ipsec policy is very flexible allowing users to setup their
287 ipsec processes in as secure a method as possible.
288
289 STANDARD FILE CONTEXT
290
291 SELinux defines the file context types for the ipsec, if you wanted to
292 store files with these types in a diffent paths, you need to execute
293 the semanage command to sepecify alternate labeling and then use
294 restorecon to put the labels on disk.
295
296 semanage fcontext -a -t ipsec_var_run_t '/srv/myipsec_content(/.*)?'
297 restorecon -R -v /srv/myipsec_content
298
299 Note: SELinux often uses regular expressions to specify labels that
300 match multiple files.
301
302 The following file types are defined for ipsec:
303
304
305
306 ipsec_conf_file_t
307
308 - Set files with the ipsec_conf_file_t type, if you want to treat the
309 files as ipsec conf content.
310
311
312 Paths:
313 /etc/racoon(/.*)?, /etc/strongswan(/.*)?, /etc/ipsec.conf,
314 /etc/strongswan/ipsec.conf
315
316
317 ipsec_exec_t
318
319 - Set files with the ipsec_exec_t type, if you want to transition an
320 executable to the ipsec_t domain.
321
322
323 Paths:
324 /usr/lib(64)?/ipsec/spi, /usr/lib(64)?/ipsec/pluto,
325 /usr/lib(64)?/ipsec/eroute, /usr/lib(64)?/ipsec/klipsdebug,
326 /usr/local/lib(64)?/ipsec/spi, /usr/local/lib(64)?/ipsec/pluto,
327 /usr/local/lib(64)?/ipsec/eroute, /usr/local/lib(64)?/ipsec/klips‐
328 debug, /usr/libexec/strongswan/.*, /usr/libexec/ipsec/spi,
329 /usr/libexec/ipsec/pluto, /usr/libexec/ipsec/eroute,
330 /usr/libexec/ipsec/klipsdebug
331
332
333 ipsec_initrc_exec_t
334
335 - Set files with the ipsec_initrc_exec_t type, if you want to transi‐
336 tion an executable to the ipsec_initrc_t domain.
337
338
339 Paths:
340 /etc/rc.d/init.d/ipsec, /etc/rc.d/init.d/racoon,
341 /etc/rc.d/init.d/strongswan
342
343
344 ipsec_key_file_t
345
346 - Set files with the ipsec_key_file_t type, if you want to treat the
347 files as ipsec key content.
348
349
350 Paths:
351 /etc/ipsec.d(/.*)?, /etc/racoon/certs(/.*)?,
352 /etc/strongswan/ipsec.d(/.*)?, /etc/strongswan/ipsec.secrets.*,
353 /etc/ipsec.secrets, /etc/racoon/psk.txt
354
355
356 ipsec_log_t
357
358 - Set files with the ipsec_log_t type, if you want to treat the data as
359 ipsec log data, usually stored under the /var/log directory.
360
361
362
363 ipsec_mgmt_exec_t
364
365 - Set files with the ipsec_mgmt_exec_t type, if you want to transition
366 an executable to the ipsec_mgmt_t domain.
367
368
369 Paths:
370 /usr/lib(64)?/ipsec/_plutorun, /usr/lib(64)?/ipsec/_plutoload,
371 /usr/sbin/ipsec, /usr/sbin/strongswan, /usr/libexec/ipsec/_plu‐
372 torun, /usr/libexec/ipsec/_plutoload, /usr/libexec/nm-openswan-
373 service
374
375
376 ipsec_mgmt_lock_t
377
378 - Set files with the ipsec_mgmt_lock_t type, if you want to treat the
379 files as ipsec mgmt lock data, stored under the /var/lock directory
380
381
382 Paths:
383 /var/lock/subsys/ipsec, /var/lock/subsys/strongswan
384
385
386 ipsec_mgmt_var_run_t
387
388 - Set files with the ipsec_mgmt_var_run_t type, if you want to store
389 the ipsec mgmt files under the /run or /var/run directory.
390
391
392
393 ipsec_tmp_t
394
395 - Set files with the ipsec_tmp_t type, if you want to store ipsec tem‐
396 porary files in the /tmp directories.
397
398
399
400 ipsec_var_run_t
401
402 - Set files with the ipsec_var_run_t type, if you want to store the
403 ipsec files under the /run or /var/run directory.
404
405
406 Paths:
407 /var/racoon(/.*)?, /var/run/pluto(/.*)?, /var/run/charon.pid,
408 /var/run/charon.ctl, /var/run/racoon.pid
409
410
411 Note: File context can be temporarily modified with the chcon command.
412 If you want to permanently change the file context you need to use the
413 semanage fcontext command. This will modify the SELinux labeling data‐
414 base. You will need to use restorecon to apply the labels.
415
416
418 semanage fcontext can also be used to manipulate default file context
419 mappings.
420
421 semanage permissive can also be used to manipulate whether or not a
422 process type is permissive.
423
424 semanage module can also be used to enable/disable/install/remove pol‐
425 icy modules.
426
427 semanage port can also be used to manipulate the port definitions
428
429 semanage boolean can also be used to manipulate the booleans
430
431
432 system-config-selinux is a GUI tool available to customize SELinux pol‐
433 icy settings.
434
435
437 This manual page was auto-generated using sepolicy manpage .
438
439
441 selinux(8), ipsec(8), semanage(8), restorecon(8), chcon(1) , setse‐
442 bool(8), ipsec_mgmt_selinux(8), ipsec_mgmt_selinux(8)
443
444
445
446ipsec 15-06-03 ipsec_selinux(8)