Squid (squid.conf)
Categoria: Networking
Software: Squid
[ Hits: 6.572 ]
Por: João Paulo Unterckircher
Configuração do proxy com autenticação de usuários, bloqueio de url, bloqueio de palavras e bloqueio de downloads.
BEM-VINDO AO SQUID 2.5 Autor: Joao Paulo Unterckircher ### PORTA DO SQUID ### http_port 3128 ### NOME DO SERVIDOR ### visible_hostname localhost ### CAMINHO DOS ARQUIVOS EM CACHE ### cache_dir ufs /var/spool/squid/ 200 16 256 ### CAMINHO DO ARQUIVO DE LOG ### cache_access_log /var/log/squid/access.log ### INFORMAÇÕES DO ARQUIVO DE LOG ### debug_options ALL,1 ### MENSAGENS DE ERRO DO SQUID EM PORTUGUÊS ### error_directory /usr/share/squid/errors/Portuguese ### ATUALIZAÇÃO DO CACHE ### refresh_pattern ^ftp: 15 20% 2280 refresh_pattern ^gopher: 15 0% 2280 refresh_pattern . 15 20% 2280 ### AUTENTICAÇÃO DO PROXY ### auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/controle/usuarios auth_param basic children 5 auth_param basic realm Acesso Restrito ### DECLARAÇÃO DAS ACLS ### acl QUERY urlpath_regex cgi-bin \? acl all src 0.0.0.0/0.0.0.0 acl autenticar proxy_auth REQUIRED acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 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 1025-65535 #portas nao registradas 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 901 #swat acl Safe_ports port 620000 #webmail acl purge method CONNECT acl CONNECT method CONNECT acl webmin port 10000 #webmin ### ACLS USUÁRIOS LIBERADOS ### acl usuarios proxy_auth "/etc/squid/controle/usuarios" ### LIBERAÇÃO DAS ACLS ### http_access deny webmin http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost ### LIBERAÇÃO DAS ACLS USUÁRIOS ### http_access allow autenticar usuarios ### REGRAS DE BLOQUEIO DE SITES POR PALAVRAS ### acl palavra dstdom_regex "/etc/squid/bloqueios/palavras" http_access deny palavra ### REGRAS DE BLOQUEIO DE SITES POR URL ### #acl site url_regex -i "/etc/squid/bloqueios/sites" #http_access deny site ### REGRAS DE BLOQUEIO DE DOWNLOADS ### #acl downloads urlpath_regex -i "/etc/squid/bloqueios/downloads" #http_access deny downloads ### PARÂMETROS DO PROXY TRANSPARENTE ### httpd_accel_host virtual httpd_accel_port 80 httpd_accel_with_proxy on httpd_accel_uses_host_header on
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Descritores de Arquivos e Swappiness
Solução rápida para o problema do Network Manager conectar mas não navegar
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
Montando e usando iso de um sistema dentro do outro (2)
Criar atalho para uma pasta na area de trabalho no Linux Mint? (0)
Precisa de ajuda com monitoramento ou problemas com Zabbix? (0)