Squid (squid.conf)
Conf para autenticação de usuários e com opções de bloqueio por horário, MSN, palavras, sites e extensões de arquivos.
Categoria: Networking
Software: Squid
[ Hits: 8.900 ]
Por: Sérgio Abrantes Junior
Esse conf é para utilização com autenticação de usuários.
Fiz algumas divisões para conseguir bloquear palavras e sites.
Há opções para controlar acesso por horário, bloqueio a extensões de arquivos e MSN.
# WELCOME TO SQUID 2.6.STABLE16 # ---------------------------- # # This is the default Squid configuration file. You may wish # to look at the Squid home page (http://www.squid-cache.org/) # for the FAQ and other documentation. # # The default Squid config file shows what the defaults for # various options happen to be. If you don't need to change the # default, you shouldn't uncomment the line. Doing so may cause # run-time problems. In some cases "none" refers to no default # setting at all, while in other cases it refers to a valid # option - the comments for that keyword indicate if this is the # case. # ########################################################################################### # Regras Gerais do Squid - NAO MODIFICAR # ########################################################################################### auth_param basic program /usr/local/squid/libexec/ncsa_auth /usr/local/squid/etc/passwd auth_param basic children 5 auth_param basic realm Proxy EmpresaX - Faça sua autenticação auth_param basic credentialsttl 2 hours auth_param basic casesensitive off acl password proxy_auth REQUIRED acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais 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 CONNECT method CONNECT ########################################################################################### # Fim das configurações gerais # ########################################################################################### # Configurações referentes as palavras# acl palavras_bloqueadas url_regex -i "/usr/local/squid/conf/palavras_bloqueadas" acl palavras_fotologs url_regex -i "/usr/local/squid/conf/palavras_fotologs" acl palavras_musica_video url_regex -i "/usr/local/squid/conf/palavras_musica_video" acl palavras_putaria url_regex -i "/usr/local/squid/conf/palavras_putaria" acl palavras_orkut url_regex -i "/usr/local/squid/conf/palavras_orkut" # Configurações referentes aos sites # #acl sites_email dstdomain "/usr/local/squid/conf/sites_email" acl sites_bloqueados dstdomain "/usr/local/squid/conf/sites_bloqueados" acl sites_fotolog dstdomain "/usr/local/squid/conf/sites_fotolog" acl sites_musica_video dstdomain "/usr/local/squid/conf/sites_musica_video" acl sites_orkut dstdomain "/usr/local/squid/conf/sites_orkut" acl sites_putaria dstdomain "/usr/local/squid/conf/sites_putaria" acl sites_permitidos dstdomain "/usr/local/squid/conf/sites_permitidos" acl mimeproibe rep_mime_type -i "/usr/local/squid/conf/mime_proibe" # Configurações de horário # acl almoco time 12:00-13:30 #acl depois_horario_noite time 18:00-23:59 #acl depois_horario_manha time 00:01-07:45 # Configurações para proibir download de video e música acl proibir_musica urlpath_regex -i \.aif$ \.aifc$ \.aiff$ \.asf$ \.asx$ \.avi$ \.au$ \.m3u$ \.med$\.mp3$ \.m1v$ \.mp2$ \.mp2v$ \.mpa$ \.mov$ \.mpe$ \.mpg$ \.mpeg$ \.ogg$ \.pls$ \.ram$ \.ra$ \.ram$ \.snd$ \.wma$ \.wmv$ \.wvx$ \.mid$ \.midi$ \.rmi$ \.src$ # Configurações referentes ao bloqueio ao MSN # acl msn1 url_regex -i /gateway/gateway.dll acl msn2 req_mime_type -i ^application/x-msn-messenger$ acl msn_web url_regex "/usr/local/squid/conf/msn_web" # Configurações referente aos usuários usuários # acl users_liberados proxy_auth "/usr/local/squid/conf/users_liberados" #acl users_lista1 proxy_auth "/usr/local/squid/conf/users_lista1" #acl users_lista2 proxy_auth "/usr/local/squid/conf/users_lista2" acl users_geral proxy_auth "/usr/local/squid/conf/users_geral" # Paginas que nao ficam armazenadas no cache # acl NOCACHE url_regex -i "/usr/local/squid/conf/no_cache" \? no_cache deny NOCACHE http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports ########################################################################################### # Configurações que serão lidas # ########################################################################################### ## Usuarios liberados ## http_access allow users_liberados ## Minhas ACLs ## http_access allow sites_permitidos # Proibir palavras # http_access deny palavras_bloqueadas http_access deny palavras_fotologs http_access deny palavras_musica_video http_access deny palavras_putaria http_access deny palavras_orkut !almoco # Fim proibir palavras # # Proibir sites # #http_access deny sites_email !almoco !depois_horario_noite !depois_horario_manha http_access deny sites_bloqueados http_access deny sites_fotolog http_access deny sites_musica_video http_access deny sites_orkut !almoco http_access deny sites_putaria # Fim Proibir sites # # Proibir MSN # http_access deny msn1 http_access deny msn2 http_access deny msn_web # Proibir musica # http_access deny proibir_musica http_access deny mimeproibe # Fim Proibir musica # # Micros da rede # http_access allow users_geral ## Fim Minhas ACLs ## ############################################################################################## ############################################################################################## ############################################################################################## http_access deny all icp_access allow all http_port 3128 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? cache deny QUERY cache_dir ufs /var/cache/squid 2048 16 256 access_log /var/log/squid/access.log squid cache_log /var/log/squid/cache.log cache_store_log /var/log/squid/store.log refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 acl apache rep_header Server ^Apache broken_vary_encoding allow apache cache_effective_user nobody cache_effective_group users error_directory /usr/local/squid/share/errors/Portuguese coredump_dir /usr/local/squid/var/cache
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
Como renomear arquivos de letras maiúsculas para minúsculas
Imprimindo no formato livreto no Linux
Vim - incrementando números em substituição
Efeito "livro" em arquivos PDF
Como resolver o erro no CUPS: Unable to get list of printer drivers
Excluir banco de dados no xampp (1)
phpmyadmin não abre no xampp (2)
[Python] Automação de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas às imagens de uma pasta