1iptables_selinux(8) SELinux Policy iptables iptables_selinux(8)
2
3
4
6 iptables_selinux - Security Enhanced Linux Policy for the iptables pro‐
7 cesses
8
10 Security-Enhanced Linux secures the iptables processes via flexible
11 mandatory access control.
12
13 The iptables processes execute with the iptables_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep iptables_t
20
21
22
24 The iptables_t SELinux type can be entered via the iptables_exec_t file
25 type.
26
27 The default entrypoint paths for the iptables_t domain are the follow‐
28 ing:
29
30 /sbin/ip6?tables.*, /sbin/ip6?tables-multi.*, /sbin/ip6?tables-
31 restore.*, /usr/sbin/ip6?tables.*, /usr/sbin/ip6?tables-multi.*,
32 /usr/sbin/ip6?tables-restore.*, /sbin/ipchains.*, /usr/sbin/ipchains.*,
33 /usr/libexec/iptables/iptables.init, /usr/libexec/ipta‐
34 bles/ip6tables.init, /sbin/ipset, /sbin/ipvsadm, /sbin/ebtables,
35 /sbin/arptables, /usr/sbin/ipset, /usr/sbin/ipvsadm,
36 /usr/libexec/ipset, /sbin/ipvsadm-save, /usr/sbin/ebtables, /sbin/xta‐
37 bles-multi, /usr/sbin/arptables, /usr/sbin/conntrack, /sbin/arptables-
38 save, /sbin/ipvsadm-restore, /sbin/ebtables-restore, /usr/sbin/ipvsadm-
39 save, /sbin/arptables-restore, /usr/sbin/xtables-multi,
40 /usr/sbin/ipvsadm-restore, /usr/sbin/ebtables-restore
41
43 SELinux defines process types (domains) for each process running on the
44 system
45
46 You can see the context of a process using the -Z option to ps
47
48 Policy governs the access confined processes have to files. SELinux
49 iptables policy is very flexible allowing users to setup their iptables
50 processes in as secure a method as possible.
51
52 The following process types are defined for iptables:
53
54 iptables_t
55
56 Note: semanage permissive -a iptables_t can be used to make the process
57 type iptables_t permissive. SELinux does not deny access to permissive
58 process types, but the AVC (SELinux denials) messages are still gener‐
59 ated.
60
61
63 SELinux policy is customizable based on least access required. ipta‐
64 bles policy is extremely flexible and has several booleans that allow
65 you to manipulate the policy and run iptables with the tightest access
66 possible.
67
68
69
70 If you want to allow users to resolve user passwd entries directly from
71 ldap rather then using a sssd server, you must turn on the authlo‐
72 gin_nsswitch_use_ldap boolean. Disabled by default.
73
74 setsebool -P authlogin_nsswitch_use_ldap 1
75
76
77
78 If you want to allow all daemons the ability to read/write terminals,
79 you must turn on the daemons_use_tty boolean. Disabled by default.
80
81 setsebool -P daemons_use_tty 1
82
83
84
85 If you want to deny any process from ptracing or debugging any other
86 processes, you must turn on the deny_ptrace boolean. Enabled by
87 default.
88
89 setsebool -P deny_ptrace 1
90
91
92
93 If you want to allow dhcpc client applications to execute iptables com‐
94 mands, you must turn on the dhcpc_exec_iptables boolean. Disabled by
95 default.
96
97 setsebool -P dhcpc_exec_iptables 1
98
99
100
101 If you want to allow any process to mmap any file on system with
102 attribute file_type, you must turn on the domain_can_mmap_files bool‐
103 ean. Enabled by default.
104
105 setsebool -P domain_can_mmap_files 1
106
107
108
109 If you want to allow all domains write to kmsg_device, while kernel is
110 executed with systemd.log_target=kmsg parameter, you must turn on the
111 domain_can_write_kmsg boolean. Disabled by default.
112
113 setsebool -P domain_can_write_kmsg 1
114
115
116
117 If you want to allow all domains to use other domains file descriptors,
118 you must turn on the domain_fd_use boolean. Enabled by default.
119
120 setsebool -P domain_fd_use 1
121
122
123
124 If you want to allow all domains to have the kernel load modules, you
125 must turn on the domain_kernel_load_modules boolean. Disabled by
126 default.
127
128 setsebool -P domain_kernel_load_modules 1
129
130
131
132 If you want to allow all domains to execute in fips_mode, you must turn
133 on the fips_mode boolean. Enabled by default.
134
135 setsebool -P fips_mode 1
136
137
138
139 If you want to enable reading of urandom for all domains, you must turn
140 on the global_ssp boolean. Disabled by default.
141
142 setsebool -P global_ssp 1
143
144
145
146 If you want to allow confined applications to run with kerberos, you
147 must turn on the kerberos_enabled boolean. Enabled by default.
148
149 setsebool -P kerberos_enabled 1
150
151
152
153 If you want to allow system to run with NIS, you must turn on the
154 nis_enabled boolean. Disabled by default.
155
156 setsebool -P nis_enabled 1
157
158
159
160 If you want to allow confined applications to use nscd shared memory,
161 you must turn on the nscd_use_shm boolean. Disabled by default.
162
163 setsebool -P nscd_use_shm 1
164
165
166
168 The SELinux process type iptables_t can manage files labeled with the
169 following file types. The paths listed are the default paths for these
170 file types. Note the processes UID still need to have DAC permissions.
171
172 etc_runtime_t
173
174 /[^/]+
175 /etc/mtab.*
176 /etc/blkid(/.*)?
177 /etc/nologin.*
178 /etc/.fstab.hal..+
179 /halt
180 /fastboot
181 /poweroff
182 /etc/cmtab
183 /forcefsck
184 /.autofsck
185 /.suspended
186 /fsckoptions
187 /var/.updated
188 /etc/.updated
189 /.autorelabel
190 /etc/securetty
191 /etc/nohotplug
192 /etc/killpower
193 /etc/ioctl.save
194 /etc/fstab.REVOKE
195 /etc/network/ifstate
196 /etc/sysconfig/hwconf
197 /etc/ptal/ptal-printd-like
198 /etc/sysconfig/iptables.save
199 /etc/xorg.conf.d/00-system-setup-keyboard.conf
200 /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf
201
202 initrc_tmp_t
203
204
205 iptables_lock_t
206
207 /var/lock/subsys/iptables
208 /var/lock/subsys/ip6tables
209
210 iptables_tmp_t
211
212
213 iptables_var_lib_t
214
215 /var/lib/ebtables(/.*)?
216
217 iptables_var_run_t
218
219 /var/run/xtables.*
220 /var/run/ebtables.*
221
222 psad_tmp_t
223
224
225 psad_var_log_t
226
227 /var/log/psad(/.*)?
228
229 shorewall_var_lib_t
230
231 /var/lib/shorewall(/.*)?
232 /var/lib/shorewall6(/.*)?
233 /var/lib/shorewall-lite(/.*)?
234
235 system_conf_t
236
237 /ostree/repo(/.*)?
238 /etc/yum.repos.d(/.*)?
239 /etc/sysctl.conf(.old)?
240 /etc/sysconfig/ip6?tables.*
241 /etc/ostree/remotes.d(/.*)?
242 /etc/sysconfig/ipvsadm.*
243 /etc/sysconfig/ebtables.*
244 /etc/sysconfig/system-config-firewall.*
245 /ostree/deploy/rhel-atomic-host/deploy(/.*)?
246
247
249 SELinux requires files to have an extended attribute to define the file
250 type.
251
252 You can see the context of a file using the -Z option to ls
253
254 Policy governs the access confined processes have to these files.
255 SELinux iptables policy is very flexible allowing users to setup their
256 iptables processes in as secure a method as possible.
257
258 STANDARD FILE CONTEXT
259
260 SELinux defines the file context types for the iptables, if you wanted
261 to store files with these types in a diffent paths, you need to execute
262 the semanage command to sepecify alternate labeling and then use
263 restorecon to put the labels on disk.
264
265 semanage fcontext -a -t iptables_var_run_t '/srv/myiptables_con‐
266 tent(/.*)?'
267 restorecon -R -v /srv/myiptables_content
268
269 Note: SELinux often uses regular expressions to specify labels that
270 match multiple files.
271
272 The following file types are defined for iptables:
273
274
275
276 iptables_exec_t
277
278 - Set files with the iptables_exec_t type, if you want to transition an
279 executable to the iptables_t domain.
280
281
282 Paths:
283 /sbin/ip6?tables.*, /sbin/ip6?tables-multi.*, /sbin/ip6?tables-
284 restore.*, /usr/sbin/ip6?tables.*, /usr/sbin/ip6?tables-multi.*,
285 /usr/sbin/ip6?tables-restore.*, /sbin/ipchains.*,
286 /usr/sbin/ipchains.*, /usr/libexec/iptables/iptables.init,
287 /usr/libexec/iptables/ip6tables.init, /sbin/ipset, /sbin/ipvsadm,
288 /sbin/ebtables, /sbin/arptables, /usr/sbin/ipset,
289 /usr/sbin/ipvsadm, /usr/libexec/ipset, /sbin/ipvsadm-save,
290 /usr/sbin/ebtables, /sbin/xtables-multi, /usr/sbin/arptables,
291 /usr/sbin/conntrack, /sbin/arptables-save, /sbin/ipvsadm-restore,
292 /sbin/ebtables-restore, /usr/sbin/ipvsadm-save, /sbin/arptables-
293 restore, /usr/sbin/xtables-multi, /usr/sbin/ipvsadm-restore,
294 /usr/sbin/ebtables-restore
295
296
297 iptables_initrc_exec_t
298
299 - Set files with the iptables_initrc_exec_t type, if you want to tran‐
300 sition an executable to the iptables_initrc_t domain.
301
302
303 Paths:
304 /etc/rc.d/init.d/ip6?tables, /etc/rc.d/init.d/ebtables
305
306
307 iptables_lock_t
308
309 - Set files with the iptables_lock_t type, if you want to treat the
310 files as iptables lock data, stored under the /var/lock directory
311
312
313 Paths:
314 /var/lock/subsys/iptables, /var/lock/subsys/ip6tables
315
316
317 iptables_tmp_t
318
319 - Set files with the iptables_tmp_t type, if you want to store iptables
320 temporary files in the /tmp directories.
321
322
323
324 iptables_unit_file_t
325
326 - Set files with the iptables_unit_file_t type, if you want to treat
327 the files as iptables unit content.
328
329
330 Paths:
331 /usr/lib/systemd/system/ppp.*, /usr/lib/systemd/system/ipset.*,
332 /usr/lib/systemd/system/vsftpd.*, /usr/lib/systemd/sys‐
333 tem/proftpd.*, /usr/lib/systemd/system/iptables.*, /usr/lib/sys‐
334 temd/system/arptables.*, /usr/lib/systemd/system/ip6tables.*
335
336
337 iptables_var_lib_t
338
339 - Set files with the iptables_var_lib_t type, if you want to store the
340 iptables files under the /var/lib directory.
341
342
343
344 iptables_var_run_t
345
346 - Set files with the iptables_var_run_t type, if you want to store the
347 iptables files under the /run or /var/run directory.
348
349
350 Paths:
351 /var/run/xtables.*, /var/run/ebtables.*
352
353
354 Note: File context can be temporarily modified with the chcon command.
355 If you want to permanently change the file context you need to use the
356 semanage fcontext command. This will modify the SELinux labeling data‐
357 base. You will need to use restorecon to apply the labels.
358
359
361 semanage fcontext can also be used to manipulate default file context
362 mappings.
363
364 semanage permissive can also be used to manipulate whether or not a
365 process type is permissive.
366
367 semanage module can also be used to enable/disable/install/remove pol‐
368 icy modules.
369
370 semanage boolean can also be used to manipulate the booleans
371
372
373 system-config-selinux is a GUI tool available to customize SELinux pol‐
374 icy settings.
375
376
378 This manual page was auto-generated using sepolicy manpage .
379
380
382 selinux(8), iptables(8), semanage(8), restorecon(8), chcon(1), sepol‐
383 icy(8) , setsebool(8)
384
385
386
387iptables 19-04-25 iptables_selinux(8)