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. Disabled 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 vpnc_var_run_t
286
287 /var/run/vpnc(/.*)?
288
289
291 SELinux requires files to have an extended attribute to define the file
292 type.
293
294 You can see the context of a file using the -Z option to ls
295
296 Policy governs the access confined processes have to these files.
297 SELinux openvpn policy is very flexible allowing users to setup their
298 openvpn processes in as secure a method as possible.
299
300 EQUIVALENCE DIRECTORIES
301
302
303 openvpn policy stores data with multiple different file context types
304 under the /var/run/openvpn directory. If you would like to store the
305 data in a different directory you can use the semanage command to cre‐
306 ate an equivalence mapping. If you wanted to store this data under the
307 /srv dirctory you would execute the following command:
308
309 semanage fcontext -a -e /var/run/openvpn /srv/openvpn
310 restorecon -R -v /srv/openvpn
311
312 STANDARD FILE CONTEXT
313
314 SELinux defines the file context types for the openvpn, if you wanted
315 to store files with these types in a diffent paths, you need to execute
316 the semanage command to sepecify alternate labeling and then use
317 restorecon to put the labels on disk.
318
319 semanage fcontext -a -t openvpn_var_run_t '/srv/myopenvpn_con‐
320 tent(/.*)?'
321 restorecon -R -v /srv/myopenvpn_content
322
323 Note: SELinux often uses regular expressions to specify labels that
324 match multiple files.
325
326 The following file types are defined for openvpn:
327
328
329
330 openvpn_etc_rw_t
331
332 - Set files with the openvpn_etc_rw_t type, if you want to treat the
333 files as openvpn etc read/write content.
334
335
336
337 openvpn_etc_t
338
339 - Set files with the openvpn_etc_t type, if you want to store openvpn
340 files in the /etc directories.
341
342
343
344 openvpn_exec_t
345
346 - Set files with the openvpn_exec_t type, if you want to transition an
347 executable to the openvpn_t domain.
348
349
350
351 openvpn_initrc_exec_t
352
353 - Set files with the openvpn_initrc_exec_t type, if you want to transi‐
354 tion an executable to the openvpn_initrc_t domain.
355
356
357
358 openvpn_status_t
359
360 - Set files with the openvpn_status_t type, if you want to treat the
361 files as openvpn status data.
362
363
364
365 openvpn_tmp_t
366
367 - Set files with the openvpn_tmp_t type, if you want to store openvpn
368 temporary files in the /tmp directories.
369
370
371
372 openvpn_unconfined_script_exec_t
373
374 - Set files with the openvpn_unconfined_script_exec_t type, if you want
375 to transition an executable to the openvpn_unconfined_script_t domain.
376
377
378
379 openvpn_var_lib_t
380
381 - Set files with the openvpn_var_lib_t type, if you want to store the
382 openvpn files under the /var/lib directory.
383
384
385
386 openvpn_var_log_t
387
388 - Set files with the openvpn_var_log_t type, if you want to treat the
389 data as openvpn var log data, usually stored under the /var/log direc‐
390 tory.
391
392
393
394 openvpn_var_run_t
395
396 - Set files with the openvpn_var_run_t type, if you want to store the
397 openvpn files under the /run or /var/run directory.
398
399
400 Paths:
401 /var/run/openvpn(/.*)?, /var/run/openvpn.client.*, /var/run/open‐
402 vpn-server(/.*)?
403
404
405 Note: File context can be temporarily modified with the chcon command.
406 If you want to permanently change the file context you need to use the
407 semanage fcontext command. This will modify the SELinux labeling data‐
408 base. You will need to use restorecon to apply the labels.
409
410
412 semanage fcontext can also be used to manipulate default file context
413 mappings.
414
415 semanage permissive can also be used to manipulate whether or not a
416 process type is permissive.
417
418 semanage module can also be used to enable/disable/install/remove pol‐
419 icy modules.
420
421 semanage port can also be used to manipulate the port definitions
422
423 semanage boolean can also be used to manipulate the booleans
424
425
426 system-config-selinux is a GUI tool available to customize SELinux pol‐
427 icy settings.
428
429
431 This manual page was auto-generated using sepolicy manpage .
432
433
435 selinux(8), openvpn(8), semanage(8), restorecon(8), chcon(1), sepol‐
436 icy(8), setsebool(8), openvpn_unconfined_script_selinux(8), open‐
437 vpn_unconfined_script_selinux(8)
438
439
440
441openvpn 19-06-18 openvpn_selinux(8)