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, /usr/libexec/squid/cache_swap.sh
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, squid_cron_t, squid_script_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 determine whether squid can connect to all TCP ports,
57 you must turn on the squid_connect_any boolean. Disabled by default.
58
59 setsebool -P squid_connect_any 1
60
61
62
63 If you want to determine whether squid can run as a transparent proxy,
64 you must turn on the squid_use_tproxy boolean. Disabled by default.
65
66 setsebool -P squid_use_tproxy 1
67
68
69
70 If you want to allow all domains to execute in fips_mode, you must turn
71 on the fips_mode boolean. Enabled by default.
72
73 setsebool -P fips_mode 1
74
75
76
77 If you want to allow confined applications to run with kerberos, you
78 must turn on the kerberos_enabled boolean. Disabled by default.
79
80 setsebool -P kerberos_enabled 1
81
82
83
85 SELinux defines port types to represent TCP and UDP ports.
86
87 You can see the types associated with a port by using the following
88 command:
89
90 semanage port -l
91
92
93 Policy governs the access confined processes have to these ports.
94 SELinux squid policy is very flexible allowing users to setup their
95 squid processes in as secure a method as possible.
96
97 The following port types are defined for squid:
98
99
100 squid_port_t
101
102
103
104 Default Defined Ports:
105 tcp 3128,3401,4827
106 udp 3401,4827
107
109 The SELinux process type squid_t can manage files labeled with the fol‐
110 lowing file types. The paths listed are the default paths for these
111 file types. Note the processes UID still need to have DAC permissions.
112
113 cluster_conf_t
114
115 /etc/cluster(/.*)?
116
117 cluster_var_lib_t
118
119 /var/lib/pcsd(/.*)?
120 /var/lib/cluster(/.*)?
121 /var/lib/openais(/.*)?
122 /var/lib/pengine(/.*)?
123 /var/lib/corosync(/.*)?
124 /usr/lib/heartbeat(/.*)?
125 /var/lib/heartbeat(/.*)?
126 /var/lib/pacemaker(/.*)?
127
128 cluster_var_run_t
129
130 /var/run/crm(/.*)?
131 /var/run/cman_.*
132 /var/run/rsctmp(/.*)?
133 /var/run/aisexec.*
134 /var/run/heartbeat(/.*)?
135 /var/run/corosync-qnetd(/.*)?
136 /var/run/corosync-qdevice(/.*)?
137 /var/run/corosync.pid
138 /var/run/cpglockd.pid
139 /var/run/rgmanager.pid
140 /var/run/cluster/rgmanager.sk
141
142 faillog_t
143
144 /var/log/btmp.*
145 /var/log/faillog.*
146 /var/log/tallylog.*
147 /var/run/faillock(/.*)?
148
149 root_t
150
151 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
152 /
153 /initrd
154
155 security_t
156
157 /selinux
158
159 squid_cache_t
160
161 /var/lib/ssl_db(/.*)?
162 /var/lightsquid(/.*)?
163 /var/squidGuard(/.*)?
164 /var/cache/squid(/.*)?
165 /var/spool/squid(/.*)?
166 /etc/squid/ssl_db(/.*)?
167
168 squid_log_t
169
170 /var/log/squid(/.*)?
171 /var/log/squidGuard(/.*)?
172
173 squid_tmpfs_t
174
175 /dev/shm/squid-*
176
177 squid_var_run_t
178
179 /var/run/squid.*
180
181
183 SELinux requires files to have an extended attribute to define the file
184 type.
185
186 You can see the context of a file using the -Z option to ls
187
188 Policy governs the access confined processes have to these files.
189 SELinux squid policy is very flexible allowing users to setup their
190 squid processes in as secure a method as possible.
191
192 EQUIVALENCE DIRECTORIES
193
194
195 squid policy stores data with multiple different file context types
196 under the /var/log/squid directory. If you would like to store the
197 data in a different directory you can use the semanage command to cre‐
198 ate an equivalence mapping. If you wanted to store this data under the
199 /srv directory you would execute the following command:
200
201 semanage fcontext -a -e /var/log/squid /srv/squid
202 restorecon -R -v /srv/squid
203
204 STANDARD FILE CONTEXT
205
206 SELinux defines the file context types for the squid, if you wanted to
207 store files with these types in a diffent paths, you need to execute
208 the semanage command to sepecify alternate labeling and then use
209 restorecon to put the labels on disk.
210
211 semanage fcontext -a -t squid_ra_content_t '/srv/mysquid_content(/.*)?'
212 restorecon -R -v /srv/mysquid_content
213
214 Note: SELinux often uses regular expressions to specify labels that
215 match multiple files.
216
217 The following file types are defined for squid:
218
219
220
221 squid_cache_t
222
223 - Set files with the squid_cache_t type, if you want to store the files
224 under the /var/cache directory.
225
226
227 Paths:
228 /var/lib/ssl_db(/.*)?, /var/lightsquid(/.*)?, /var/squid‐
229 Guard(/.*)?, /var/cache/squid(/.*)?, /var/spool/squid(/.*)?,
230 /etc/squid/ssl_db(/.*)?
231
232
233 squid_conf_t
234
235 - Set files with the squid_conf_t type, if you want to treat the files
236 as squid configuration data, usually stored under the /etc directory.
237
238
239 Paths:
240 /etc/squid(/.*)?, /etc/lightsquid(/.*)?, /usr/share/squid(/.*)?
241
242
243 squid_content_t
244
245 - Set files with the squid_content_t type, if you want to treat the
246 files as squid content.
247
248
249
250 squid_cron_exec_t
251
252 - Set files with the squid_cron_exec_t type, if you want to transition
253 an executable to the squid_cron_t domain.
254
255
256
257 squid_exec_t
258
259 - Set files with the squid_exec_t type, if you want to transition an
260 executable to the squid_t domain.
261
262
263 Paths:
264 /usr/sbin/squid, /usr/libexec/squid/cache_swap.sh
265
266
267 squid_htaccess_t
268
269 - Set files with the squid_htaccess_t type, if you want to treat the
270 file as a squid access file.
271
272
273
274 squid_initrc_exec_t
275
276 - Set files with the squid_initrc_exec_t type, if you want to transi‐
277 tion an executable to the squid_initrc_t domain.
278
279
280
281 squid_log_t
282
283 - Set files with the squid_log_t type, if you want to treat the data as
284 squid log data, usually stored under the /var/log directory.
285
286
287 Paths:
288 /var/log/squid(/.*)?, /var/log/squidGuard(/.*)?
289
290
291 squid_ra_content_t
292
293 - Set files with the squid_ra_content_t type, if you want to treat the
294 files as squid read/append content.
295
296
297
298 squid_rw_content_t
299
300 - Set files with the squid_rw_content_t type, if you want to treat the
301 files as squid read/write content.
302
303
304
305 squid_script_exec_t
306
307 - Set files with the squid_script_exec_t type, if you want to transi‐
308 tion an executable to the squid_script_t domain.
309
310
311 Paths:
312 /usr/share/lightsquid/cgi(/.*)?, /usr/lib/squid/cachemgr.cgi
313
314
315 squid_tmp_t
316
317 - Set files with the squid_tmp_t type, if you want to store squid tem‐
318 porary files in the /tmp directories.
319
320
321
322 squid_tmpfs_t
323
324 - Set files with the squid_tmpfs_t type, if you want to store squid
325 files on a tmpfs file system.
326
327
328
329 squid_var_run_t
330
331 - Set files with the squid_var_run_t type, if you want to store the
332 squid files under the /run or /var/run directory.
333
334
335
336 Note: File context can be temporarily modified with the chcon command.
337 If you want to permanently change the file context you need to use the
338 semanage fcontext command. This will modify the SELinux labeling data‐
339 base. You will need to use restorecon to apply the labels.
340
341
343 semanage fcontext can also be used to manipulate default file context
344 mappings.
345
346 semanage permissive can also be used to manipulate whether or not a
347 process type is permissive.
348
349 semanage module can also be used to enable/disable/install/remove pol‐
350 icy modules.
351
352 semanage port can also be used to manipulate the port definitions
353
354 semanage boolean can also be used to manipulate the booleans
355
356
357 system-config-selinux is a GUI tool available to customize SELinux pol‐
358 icy settings.
359
360
362 This manual page was auto-generated using sepolicy manpage .
363
364
366 selinux(8), squid(8), semanage(8), restorecon(8), chcon(1), sepol‐
367 icy(8), setsebool(8), squid_cron_selinux(8), squid_script_selinux(8)
368
369
370
371squid 21-03-26 squid_selinux(8)