1openvpn_selinux(8) SELinux Policy openvpn openvpn_selinux(8)
2
3
4
6 openvpn_selinux - Security Enhanced Linux Policy for the openvpn pro‐
7 cesses
8
10 Security-Enhanced Linux secures the openvpn processes via flexible
11 mandatory access control.
12
13 The openvpn processes execute with the openvpn_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 openvpn_t
20
21
22
24 The openvpn_t SELinux type can be entered via the openvpn_exec_t file
25 type.
26
27 The default entrypoint paths for the openvpn_t domain are the follow‐
28 ing:
29
30 /usr/sbin/openvpn
31
33 SELinux defines process types (domains) for each process running on the
34 system
35
36 You can see the context of a process using the -Z option to ps
37
38 Policy governs the access confined processes have to files. SELinux
39 openvpn policy is very flexible allowing users to setup their openvpn
40 processes in as secure a method as possible.
41
42 The following process types are defined for openvpn:
43
44 openvpn_t, openvpn_unconfined_script_t
45
46 Note: semanage permissive -a openvpn_t can be used to make the process
47 type openvpn_t permissive. SELinux does not deny access to permissive
48 process types, but the AVC (SELinux denials) messages are still gener‐
49 ated.
50
51
53 SELinux policy is customizable based on least access required. openvpn
54 policy is extremely flexible and has several booleans that allow you to
55 manipulate the policy and run openvpn with the tightest access possi‐
56 ble.
57
58
59
60 If you want to determine whether openvpn can connect to the TCP net‐
61 work, you must turn on the openvpn_can_network_connect boolean. Enabled
62 by default.
63
64 setsebool -P openvpn_can_network_connect 1
65
66
67
68 If you want to determine whether openvpn can read generic user home
69 content files, you must turn on the openvpn_enable_homedirs boolean.
70 Enabled by default.
71
72 setsebool -P openvpn_enable_homedirs 1
73
74
75
76 If you want to allow openvpn to run unconfined scripts, you must turn
77 on the openvpn_run_unconfined boolean. Disabled by default.
78
79 setsebool -P openvpn_run_unconfined 1
80
81
82
83 If you want to allow users to resolve user passwd entries directly from
84 ldap rather then using a sssd server, you must turn on the authlo‐
85 gin_nsswitch_use_ldap boolean. Disabled by default.
86
87 setsebool -P authlogin_nsswitch_use_ldap 1
88
89
90
91 If you want to allow all domains to execute in fips_mode, you must turn
92 on the fips_mode boolean. Enabled by default.
93
94 setsebool -P fips_mode 1
95
96
97
98 If you want to allow confined applications to run with kerberos, you
99 must turn on the kerberos_enabled boolean. Enabled by default.
100
101 setsebool -P kerberos_enabled 1
102
103
104
105 If you want to allow system to run with NIS, you must turn on the
106 nis_enabled boolean. Disabled by default.
107
108 setsebool -P nis_enabled 1
109
110
111
112 If you want to allow confined applications to use nscd shared memory,
113 you must turn on the nscd_use_shm boolean. Enabled by default.
114
115 setsebool -P nscd_use_shm 1
116
117
118
119 If you want to support ecryptfs home directories, you must turn on the
120 use_ecryptfs_home_dirs boolean. Disabled by default.
121
122 setsebool -P use_ecryptfs_home_dirs 1
123
124
125
127 SELinux defines port types to represent TCP and UDP ports.
128
129 You can see the types associated with a port by using the following
130 command:
131
132 semanage port -l
133
134
135 Policy governs the access confined processes have to these ports.
136 SELinux openvpn policy is very flexible allowing users to setup their
137 openvpn processes in as secure a method as possible.
138
139 The following port types are defined for openvpn:
140
141
142 openvpn_port_t
143
144
145
146 Default Defined Ports:
147 tcp 1194
148 udp 1194
149
151 The SELinux process type openvpn_t can manage files labeled with the
152 following file types. The paths listed are the default paths for these
153 file types. Note the processes UID still need to have DAC permissions.
154
155 NetworkManager_var_run_t
156
157 /var/run/teamd(/.*)?
158 /var/run/nm-xl2tpd.conf.*
159 /var/run/nm-dhclient.*
160 /var/run/NetworkManager(/.*)?
161 /var/run/wpa_supplicant(/.*)?
162 /var/run/wicd.pid
163 /var/run/NetworkManager.pid
164 /var/run/nm-dns-dnsmasq.conf
165 /var/run/wpa_supplicant-global
166
167 cluster_conf_t
168
169 /etc/cluster(/.*)?
170
171 cluster_var_lib_t
172
173 /var/lib/pcsd(/.*)?
174 /var/lib/cluster(/.*)?
175 /var/lib/openais(/.*)?
176 /var/lib/pengine(/.*)?
177 /var/lib/corosync(/.*)?
178 /usr/lib/heartbeat(/.*)?
179 /var/lib/heartbeat(/.*)?
180 /var/lib/pacemaker(/.*)?
181
182 cluster_var_run_t
183
184 /var/run/crm(/.*)?
185 /var/run/cman_.*
186 /var/run/rsctmp(/.*)?
187 /var/run/aisexec.*
188 /var/run/heartbeat(/.*)?
189 /var/run/corosync-qnetd(/.*)?
190 /var/run/corosync-qdevice(/.*)?
191 /var/run/corosync.pid
192 /var/run/cpglockd.pid
193 /var/run/rgmanager.pid
194 /var/run/cluster/rgmanager.sk
195
196 ecryptfs_t
197
198 /home/[^/]+/.Private(/.*)?
199 /home/[^/]+/.ecryptfs(/.*)?
200
201 faillog_t
202
203 /var/log/btmp.*
204 /var/log/faillog.*
205 /var/log/tallylog.*
206 /var/run/faillock(/.*)?
207
208 krb5_host_rcache_t
209
210 /var/cache/krb5rcache(/.*)?
211 /var/tmp/nfs_0
212 /var/tmp/DNS_25
213 /var/tmp/host_0
214 /var/tmp/imap_0
215 /var/tmp/HTTP_23
216 /var/tmp/HTTP_48
217 /var/tmp/ldap_55
218 /var/tmp/ldap_487
219 /var/tmp/ldapmap1_0
220
221 lastlog_t
222
223 /var/log/lastlog.*
224
225 net_conf_t
226
227 /etc/hosts[^/]*
228 /etc/yp.conf.*
229 /etc/denyhosts.*
230 /etc/hosts.deny.*
231 /etc/resolv.conf.*
232 /etc/.resolv.conf.*
233 /etc/resolv-secure.conf.*
234 /var/run/cloud-init(/.*)?
235 /var/run/systemd/network(/.*)?
236 /etc/sysconfig/networking(/.*)?
237 /etc/sysconfig/network-scripts(/.*)?
238 /etc/sysconfig/network-scripts/.*resolv.conf
239 /var/run/NetworkManager/resolv.conf.*
240 /etc/ethers
241 /etc/ntp.conf
242 /var/run/systemd/resolve/resolv.conf
243 /var/run/systemd/resolve/stub-resolv.conf
244
245 openvpn_etc_rw_t
246
247 /etc/openvpn/ipp.txt
248
249 openvpn_status_t
250
251 /var/log/openvpn-status.log.*
252
253 openvpn_tmp_t
254
255
256 openvpn_var_lib_t
257
258 /var/lib/openvpn(/.*)?
259
260 openvpn_var_log_t
261
262 /var/log/openvpn.*
263
264 openvpn_var_run_t
265
266 /var/run/openvpn(/.*)?
267 /var/run/openvpn.client.*
268 /var/run/openvpn-server(/.*)?
269
270 root_t
271
272 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
273 /
274 /initrd
275
276 security_t
277
278 /selinux
279
280 systemd_passwd_var_run_t
281
282 /var/run/systemd/ask-password(/.*)?
283 /var/run/systemd/ask-password-block(/.*)?
284
285
287 SELinux requires files to have an extended attribute to define the file
288 type.
289
290 You can see the context of a file using the -Z option to ls
291
292 Policy governs the access confined processes have to these files.
293 SELinux openvpn policy is very flexible allowing users to setup their
294 openvpn processes in as secure a method as possible.
295
296 EQUIVALENCE DIRECTORIES
297
298
299 openvpn policy stores data with multiple different file context types
300 under the /var/run/openvpn directory. If you would like to store the
301 data in a different directory you can use the semanage command to cre‐
302 ate an equivalence mapping. If you wanted to store this data under the
303 /srv dirctory you would execute the following command:
304
305 semanage fcontext -a -e /var/run/openvpn /srv/openvpn
306 restorecon -R -v /srv/openvpn
307
308 STANDARD FILE CONTEXT
309
310 SELinux defines the file context types for the openvpn, if you wanted
311 to store files with these types in a diffent paths, you need to execute
312 the semanage command to sepecify alternate labeling and then use
313 restorecon to put the labels on disk.
314
315 semanage fcontext -a -t openvpn_var_run_t '/srv/myopenvpn_con‐
316 tent(/.*)?'
317 restorecon -R -v /srv/myopenvpn_content
318
319 Note: SELinux often uses regular expressions to specify labels that
320 match multiple files.
321
322 The following file types are defined for openvpn:
323
324
325
326 openvpn_etc_rw_t
327
328 - Set files with the openvpn_etc_rw_t type, if you want to treat the
329 files as openvpn etc read/write content.
330
331
332
333 openvpn_etc_t
334
335 - Set files with the openvpn_etc_t type, if you want to store openvpn
336 files in the /etc directories.
337
338
339
340 openvpn_exec_t
341
342 - Set files with the openvpn_exec_t type, if you want to transition an
343 executable to the openvpn_t domain.
344
345
346
347 openvpn_initrc_exec_t
348
349 - Set files with the openvpn_initrc_exec_t type, if you want to transi‐
350 tion an executable to the openvpn_initrc_t domain.
351
352
353
354 openvpn_status_t
355
356 - Set files with the openvpn_status_t type, if you want to treat the
357 files as openvpn status data.
358
359
360
361 openvpn_tmp_t
362
363 - Set files with the openvpn_tmp_t type, if you want to store openvpn
364 temporary files in the /tmp directories.
365
366
367
368 openvpn_unconfined_script_exec_t
369
370 - Set files with the openvpn_unconfined_script_exec_t type, if you want
371 to transition an executable to the openvpn_unconfined_script_t domain.
372
373
374
375 openvpn_var_lib_t
376
377 - Set files with the openvpn_var_lib_t type, if you want to store the
378 openvpn files under the /var/lib directory.
379
380
381
382 openvpn_var_log_t
383
384 - Set files with the openvpn_var_log_t type, if you want to treat the
385 data as openvpn var log data, usually stored under the /var/log direc‐
386 tory.
387
388
389
390 openvpn_var_run_t
391
392 - Set files with the openvpn_var_run_t type, if you want to store the
393 openvpn files under the /run or /var/run directory.
394
395
396 Paths:
397 /var/run/openvpn(/.*)?, /var/run/openvpn.client.*, /var/run/open‐
398 vpn-server(/.*)?
399
400
401 Note: File context can be temporarily modified with the chcon command.
402 If you want to permanently change the file context you need to use the
403 semanage fcontext command. This will modify the SELinux labeling data‐
404 base. You will need to use restorecon to apply the labels.
405
406
408 semanage fcontext can also be used to manipulate default file context
409 mappings.
410
411 semanage permissive can also be used to manipulate whether or not a
412 process type is permissive.
413
414 semanage module can also be used to enable/disable/install/remove pol‐
415 icy modules.
416
417 semanage port can also be used to manipulate the port definitions
418
419 semanage boolean can also be used to manipulate the booleans
420
421
422 system-config-selinux is a GUI tool available to customize SELinux pol‐
423 icy settings.
424
425
427 This manual page was auto-generated using sepolicy manpage .
428
429
431 selinux(8), openvpn(8), semanage(8), restorecon(8), chcon(1), sepol‐
432 icy(8), setsebool(8), openvpn_unconfined_script_selinux(8), open‐
433 vpn_unconfined_script_selinux(8)
434
435
436
437openvpn 19-10-08 openvpn_selinux(8)