Código: Seleccionar todo
# OPTIONS FOR AUTHENTICATION
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/users-passwd
#auth_param basic program /usr/local/sbin/check_mysql.php
#auth_param basic program /etc/squid3/scripts/squid-auth.py
auth_param basic children 10
auth_param basic realm Servicio de Internet Policlinico San Juan y Martinez
auth_param basic casesensitive on
auth_param basic credentialsttl 2 hours
# NETWORK OPTIONS
# -----------------------------------------------------------------------------
http_port 3128  
# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
# -----------------------------------------------------------------------------
cache_peer prox.sld.cu	       parent    3128  0  proxy-only no-query default
cache_peer_domain prox.sld.cu !.sld.cu !201.220.192.0/19 !.infomed.cu !10.0.0.0/8 !192.168.0.0/24
hierarchy_stoplist cgi-bin ?
##MEMORY CACHE OPTIONS
# -----------------------------------------------------------------------------
cache_mem 16 MB
maximum_object_size_in_memory 16 KB
memory_replacement_policy lru
# DISK CACHE OPTIONS
# -----------------------------------------------------------------------------
cache_dir ufs /var/spool/squid3 1500 16 256
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
log_mime_hdrs on
#Default:
logfile_rotate 12
# OPTIONS FOR TUNING THE CACHE
# -----------------------------------------------------------------------------
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern (cgi-bin|\?)	0	0%	0
refresh_pattern .		0	20%	4320
# ADMINISTRATIVE PARAMETERS
# -----------------------------------------------------------------------------
cache_mgr polsj@infomed.sld.cu
httpd_suppress_version_string on
visible_hostname proxy.polsj.pri.sld.cu
hostname_aliases proxy.polsj.pri.sld.cu
# SNMP OPTIONS
# -----------------------------------------------------------------------------
snmp_port 3401
#snmp_access allow|deny [!]aclname ...
snmp_incoming_address 192.168.0.3
#snmp_outgoing_address 255.255.255.255
# ICP OPTIONS
# -----------------------------------------------------------------------------
icp_port 3130
htcp_port 4827
log_icp_queries off
udp_incoming_address 192.168.0.3
# udp_outgoing_address 255.255.255.255
#	NOTE, udp_incoming_address and udp_outgoing_address can not
#	have the same value since they both use the same port.
# ERROR PAGE OPTIONS
# -----------------------------------------------------------------------------
error_directory /usr/share/squid3/errors/Spanish
# DNS OPTIONS
# -----------------------------------------------------------------------------
check_hostnames on
# allow_underscore on
append_domain .sld.cu
# MISCELLANEOUS
# -----------------------------------------------------------------------------
memory_pools on
memory_pools_limit 50 MB
forwarded_for on
retry_on_error on
###############################################################################
##################################ACLS Y ACCESS ALLOW##########################
###############################################################################
#acl QUERY urlpath_regex cgi-bin \?
#
#acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl lan src 192.168.0.0/24
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443 563	# https, snews
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 993		# imap
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl Safe_ports port 8443	# other
acl Safe_ports port 4000	# Conferencias internet (dimdim)
acl Safe_ports port 2187	# Conferencias internet (dimdim)
acl Safe_ports port 8888	# IRC Infomed
acl CONNECT method CONNECT
#limitar conexiones simultaneas
acl conexiones maxconn 2
#Sitios esenciales del proxy de infomed
acl esenciales dstdomain "/etc/squid3/acl/esenciales-dom.txt"
#Descargas de mozilla
acl mozilla dstdomain "/etc/squid3/acl/mozilla.txt"
#Acceso elluminate
acl elluminate dstdomain .elluminate.com
never_direct allow elluminate
acl sld_domain dstdomain .sld.cu
always_direct allow sld_domain
never_direct allow all
#######DENEGAR ANTIVIRUS DESDE INFOMED############################
acl av_from_infomed url_regex -i "/etc/squid3/acl/av_infomed.txt"
######PALABRAS PROHIBIDAS#######################################
acl palabras_prohibidas url_regex "/etc/squid3/acl/palabras_prohibidas.txt
################# HORARIOS #######################################
acl downloadlimit time MTWHF 17:00-23:59
acl downloadlimit time MTWHF 00:00-07:00
acl downloadlimit time SA
acl antivir url_regex -i antivir
acl filestime time MTWHF 7:00-17:00
#Hora para habilitar el Lab2.3 de lunes a viernes
acl timeweekend time SA
acl timeredessociales time MTWHF 15:00-23:59
acl timeredessociales time SA 10:00-23:59
#Dias de navegacion
#S -> Domingo (Sunday)
#M -> Lunes (Monday)
#T -> Martes (Tuesday)
#W -> Miercoles (Wednesday)
#H -> Jueves (Thursday)
#F -> Viernes (Friday)
#A -> Sabado (Saturday)
##################SITIOS CERRADOS POR NOSOTROS############################
acl closedsites dstdom_regex -i "/etc/squid3/acl/closedsites.txt"
acl filesdenegados url_regex -i "/etc/squid3/acl/filesdenegados.txt"
acl socialpermit dstdom_regex -i "/etc/squid3/acl/socialpermit.txt"
#################BLOQUEAMOS ULTRASURF####################################
acl ultra url_regex "/etc/squid3/acl/ultra.txt"
acl ultra2 url_regex "/etc/squid3/acl/ultra2.txt"
######################GOOGLE STATIC FILES#################
acl gstatics dstdom_regex -i "/etc/squid3/acl/gstatics.txt"
#################################ACLs DE USUARIOS###########################
###Nodo
acl nodo_auth proxy_auth zero
###Direccion
acl director src 192.168.0.24/32
acl director_auth proxy_auth director
###contabilidad
acl luis src 192.168.0.32/32
acl luis_auth proxy_auth luis 
acl contabilidad src 192.168.0.33/32 192.168.0.34/32 192.168.0.35/32
acl contabilidad_auth proxy_auth ines merida sarah lucibel reinier flaca 
###Resto de usuarios que no tiene computadoras asignadas
acl usuarios src 192.168.0.38/32 192.168.0.39/32
acl usuarios_auth proxy_auth "/etc/squid3/acl/usuarios_internet.txt"
############################################################################
######HTTP_ACCESS###########################################################
http_access allow esenciales
###Acceso para el nodo
http_access allow nodo_auth
http_access deny palabras_prohibidas
http_access deny mozilla filestime
http_access deny ultra
http_access deny ultra2
#Only allow cachemgr access from localnets
http_access allow manager localhost
http_access deny manager
#Denegamos descargas de antivirus y actualizaciones
http_access deny av_from_infomed
#Denegamos acceso a Sitios Cerrados
http_access deny closedsites
#Denegamos descargas de ficheros en horario de trabajo
http_access deny filesdenegados filestime
##Acceso a Departamentos con redes sociales
http_access allow director director_auth
http_access allow luis luis_auth timeredessociales
#Cerramos Estaticos de Google
http_access deny gstatics
#Denegamos acceso a redes sociales a partir de aqui
http_access deny socialpermit timeredessociales
#Usuarios Internet sin redes sociales
http_access allow usuarios usuarios_auth
#Denegamos Conexion a puertos desconocidos
http_access deny !Safe_ports
#Denegamos Conexion a puertos que no sean SSL
http_access deny CONNECT !SSL_ports
##############################################################
##################################
#LIMITE DE TAMANO DE DESCARGAS
reply_body_max_size 15 MB !downloadlimit !nodo_auth
request_body_max_size 15 MB !downloadlimit !nodo_auth
#Denegar acceso a todo para cerrar
http_access deny all
icp_access deny all