1squid_selinux(8) SELinux Policy squid squid_selinux(8)
2
3
4
6 squid_selinux - Security Enhanced Linux Policy for the squid processes
7
9 Security-Enhanced Linux secures the squid processes via flexible manda‐
10 tory access control.
11
12 The squid processes execute with the squid_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 squid_t
19
20
21
23 The squid_t SELinux type can be entered via the squid_exec_t file type.
24
25 The default entrypoint paths for the squid_t domain are the following:
26
27 /usr/sbin/squid
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 squid policy is very flexible allowing users to setup their squid pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for squid:
40
41 squid_t
42
43 Note: semanage permissive -a squid_t can be used to make the process
44 type squid_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. squid
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run squid with the tightest access possible.
53
54
55
56 If you want to allow squid to connect to all ports, not just HTTP, FTP,
57 and Gopher ports, you must turn on the squid_connect_any boolean.
58 Enabled by default.
59
60 setsebool -P squid_connect_any 1
61
62
63
64 If you want to allow squid to run as a transparent proxy (TPROXY), you
65 must turn on the squid_use_tproxy boolean. Disabled by default.
66
67 setsebool -P squid_use_tproxy 1
68
69
70
71 If you want to allow all daemons to write corefiles to /, you must turn
72 on the allow_daemons_dump_core boolean. Disabled by default.
73
74 setsebool -P allow_daemons_dump_core 1
75
76
77
78 If you want to allow all daemons to use tcp wrappers, you must turn on
79 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
80
81 setsebool -P allow_daemons_use_tcp_wrapper 1
82
83
84
85 If you want to allow all daemons the ability to read/write terminals,
86 you must turn on the allow_daemons_use_tty boolean. Disabled by
87 default.
88
89 setsebool -P allow_daemons_use_tty 1
90
91
92
93 If you want to allow all domains to use other domains file descriptors,
94 you must turn on the allow_domain_fd_use boolean. Enabled by default.
95
96 setsebool -P allow_domain_fd_use 1
97
98
99
100 If you want to allow confined applications to run with kerberos, you
101 must turn on the allow_kerberos boolean. Enabled by default.
102
103 setsebool -P allow_kerberos 1
104
105
106
107 If you want to allow sysadm to debug or ptrace all processes, you must
108 turn on the allow_ptrace boolean. Disabled by default.
109
110 setsebool -P allow_ptrace 1
111
112
113
114 If you want to allow system to run with NIS, you must turn on the
115 allow_ypbind boolean. Disabled by default.
116
117 setsebool -P allow_ypbind 1
118
119
120
121 If you want to enable cluster mode for daemons, you must turn on the
122 daemons_enable_cluster_mode boolean. Disabled by default.
123
124 setsebool -P daemons_enable_cluster_mode 1
125
126
127
128 If you want to allow all domains to have the kernel load modules, you
129 must turn on the domain_kernel_load_modules boolean. Disabled by
130 default.
131
132 setsebool -P domain_kernel_load_modules 1
133
134
135
136 If you want to allow all domains to execute in fips_mode, you must turn
137 on the fips_mode boolean. Enabled by default.
138
139 setsebool -P fips_mode 1
140
141
142
143 If you want to enable reading of urandom for all domains, you must turn
144 on the global_ssp boolean. Disabled by default.
145
146 setsebool -P global_ssp 1
147
148
149
150 If you want to enable support for upstart as the init program, you must
151 turn on the init_upstart boolean. Enabled by default.
152
153 setsebool -P init_upstart 1
154
155
156
157 If you want to allow confined applications to use nscd shared memory,
158 you must turn on the nscd_use_shm boolean. Enabled by default.
159
160 setsebool -P nscd_use_shm 1
161
162
163
165 SELinux defines port types to represent TCP and UDP ports.
166
167 You can see the types associated with a port by using the following
168 command:
169
170 semanage port -l
171
172
173 Policy governs the access confined processes have to these ports.
174 SELinux squid policy is very flexible allowing users to setup their
175 squid processes in as secure a method as possible.
176
177 The following port types are defined for squid:
178
179
180 squid_port_t
181
182
183
184 Default Defined Ports:
185 tcp 3401,4827
186 udp 3401,4827
187
189 The SELinux process type squid_t can manage files labeled with the fol‐
190 lowing file types. The paths listed are the default paths for these
191 file types. Note the processes UID still need to have DAC permissions.
192
193 cluster_conf_t
194
195 /etc/cluster(/.*)?
196
197 cluster_var_lib_t
198
199 /var/lib(64)?/openais(/.*)?
200 /var/lib(64)?/pengine(/.*)?
201 /var/lib(64)?/corosync(/.*)?
202 /usr/lib(64)?/heartbeat(/.*)?
203 /var/lib(64)?/heartbeat(/.*)?
204 /var/lib(64)?/pacemaker(/.*)?
205 /var/lib/cluster(/.*)?
206
207 cluster_var_run_t
208
209 /var/run/crm(/.*)?
210 /var/run/cman_.*
211 /var/run/rsctmp(/.*)?
212 /var/run/aisexec.*
213 /var/run/heartbeat(/.*)?
214 /var/run/cpglockd.pid
215 /var/run/corosync.pid
216 /var/run/rgmanager.pid
217 /var/run/cluster/rgmanager.sk
218
219 faillog_t
220
221 /var/log/btmp.*
222 /var/log/faillog.*
223 /var/log/tallylog.*
224 /var/run/faillock(/.*)?
225
226 initrc_tmp_t
227
228
229 krb5_host_rcache_t
230
231 /var/cache/krb5rcache(/.*)?
232 /var/tmp/host_0
233 /var/tmp/HTTP_23
234
235 mnt_t
236
237 /mnt(/[^/]*)
238 /mnt(/[^/]*)?
239 /rhev(/[^/]*)?
240 /media(/[^/]*)
241 /media(/[^/]*)?
242 /etc/rhgb(/.*)?
243 /media/.hal-.*
244 /net
245 /afs
246 /rhev
247 /misc
248
249 pcscd_var_run_t
250
251 /var/run/pcscd.events(/.*)?
252 /var/run/pcscd.pid
253 /var/run/pcscd.pub
254 /var/run/pcscd.comm
255
256 root_t
257
258 /
259 /initrd
260
261 security_t
262
263
264 squid_cache_t
265
266 /var/squidGuard(/.*)?
267 /var/cache/squid(/.*)?
268 /var/spool/squid(/.*)?
269
270 squid_log_t
271
272 /var/log/squid(/.*)?
273 /var/log/squidGuard(/.*)?
274
275 squid_var_run_t
276
277 /var/run/squid.*
278
279 tmp_t
280
281 /tmp
282 /usr/tmp
283 /var/tmp
284 /tmp-inst
285 /var/tmp-inst
286 /var/tmp/vi.recover
287
288 tmpfs_t
289
290 /dev/shm
291
292
294 SELinux requires files to have an extended attribute to define the file
295 type.
296
297 You can see the context of a file using the -Z option to ls
298
299 Policy governs the access confined processes have to these files.
300 SELinux squid policy is very flexible allowing users to setup their
301 squid processes in as secure a method as possible.
302
303 EQUIVALENCE DIRECTORIES
304
305
306 squid policy stores data with multiple different file context types
307 under the /var/log/squid directory. If you would like to store the
308 data in a different directory you can use the semanage command to cre‐
309 ate an equivalence mapping. If you wanted to store this data under the
310 /srv dirctory you would execute the following command:
311
312 semanage fcontext -a -e /var/log/squid /srv/squid
313 restorecon -R -v /srv/squid
314
315 STANDARD FILE CONTEXT
316
317 SELinux defines the file context types for the squid, if you wanted to
318 store files with these types in a diffent paths, you need to execute
319 the semanage command to sepecify alternate labeling and then use
320 restorecon to put the labels on disk.
321
322 semanage fcontext -a -t squid_var_run_t '/srv/mysquid_content(/.*)?'
323 restorecon -R -v /srv/mysquid_content
324
325 Note: SELinux often uses regular expressions to specify labels that
326 match multiple files.
327
328 The following file types are defined for squid:
329
330
331
332 squid_cache_t
333
334 - Set files with the squid_cache_t type, if you want to store the files
335 under the /var/cache directory.
336
337
338 Paths:
339 /var/squidGuard(/.*)?, /var/cache/squid(/.*)?,
340 /var/spool/squid(/.*)?
341
342
343 squid_conf_t
344
345 - Set files with the squid_conf_t type, if you want to treat the files
346 as squid configuration data, usually stored under the /etc directory.
347
348
349 Paths:
350 /etc/squid(/.*)?, /usr/share/squid(/.*)?
351
352
353 squid_exec_t
354
355 - Set files with the squid_exec_t type, if you want to transition an
356 executable to the squid_t domain.
357
358
359
360 squid_initrc_exec_t
361
362 - Set files with the squid_initrc_exec_t type, if you want to transi‐
363 tion an executable to the squid_initrc_t domain.
364
365
366
367 squid_log_t
368
369 - Set files with the squid_log_t type, if you want to treat the data as
370 squid log data, usually stored under the /var/log directory.
371
372
373 Paths:
374 /var/log/squid(/.*)?, /var/log/squidGuard(/.*)?
375
376
377 squid_var_run_t
378
379 - Set files with the squid_var_run_t type, if you want to store the
380 squid files under the /run or /var/run directory.
381
382
383
384 Note: File context can be temporarily modified with the chcon command.
385 If you want to permanently change the file context you need to use the
386 semanage fcontext command. This will modify the SELinux labeling data‐
387 base. You will need to use restorecon to apply the labels.
388
389
391 semanage fcontext can also be used to manipulate default file context
392 mappings.
393
394 semanage permissive can also be used to manipulate whether or not a
395 process type is permissive.
396
397 semanage module can also be used to enable/disable/install/remove pol‐
398 icy modules.
399
400 semanage port can also be used to manipulate the port definitions
401
402 semanage boolean can also be used to manipulate the booleans
403
404
405 system-config-selinux is a GUI tool available to customize SELinux pol‐
406 icy settings.
407
408
410 This manual page was auto-generated using sepolicy manpage .
411
412
414 selinux(8), squid(8), semanage(8), restorecon(8), chcon(1) , setse‐
415 bool(8)
416
417
418
419squid 15-06-03 squid_selinux(8)