Squid (squid.conf)
Squid Nervoso
Categoria: Segurança
Software: Squid
[ Hits: 10.582 ]
Por: rafael jesus de maria
Este artigo descreve um conf do squid bem simplificado e de fácil manuseio , que engloba em várias funções como bloqueio de sites por palavras chaves , auto limpeza e uma descrição de criação de cache detalhada.
#-> so esta linha ja indica que e transparente### http_port 3128 transparent visible_hostname #->Nome do servidor<-# ######## TAG: acl acl minharede src 192.168.1.0/24 #->ip da sua rede## acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl localnet src 192.168.1.0/24 #->ip da sua rede## acl SSL_ports port 443 # https acl SSL_ports port 563 # snews acl SSL_ports port 873 # rsync 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 Safe_ports port 631 # cups acl Safe_ports port 873 # rsync acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT ####### TAG: acl para url_regex,allow,deny acl PALAVRAS_QUENTES url_regex -i "/etc/squid/palavraquente.txt" #acl PALAVRAS_FRIAS url_regex -i "/etc/squid/palavrafria.txt" acl IP_LIBERADO src "/etc/squid/restrited.txt" não se esqueça de criar estes arquivos e dar permisão para acesso usando o chmod 777 nome do arquivo ####### TAG: http_access para liberação ou bloqueio http_access allow IP_LIBERADO http_access deny PALAVRAS_QUENTES http_access allow minharede # Only allow cachemgr access from localhost http_access allow manager localhost http_access deny manager # Only allow purge requests from localhost http_access allow purge localhost http_access deny purge # Deny requests to unknown ports http_access deny !Safe_ports # Deny CONNECT to other than SSL ports http_access deny CONNECT !SSL_ports #http_access allow localnet http_access allow localhost # And finally deny all other access to this proxy http_access deny all #Allow ICP queries from local networks only icp_access allow localnet icp_access deny all ###### TAG: hierarchy_stoplist hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? cache deny QUERY ##### TAG: access_log ### PODE FICAR SUSEGADO QUE ELE SE LIMPA ### access_log /var/log/squid/access.log squid cache_dir ufs /var/cache/squid 1000 16 256 cache_mem 256 MB maximum_object_size_in_memory 100 KB maximum_object_size 1024 MB minimum_object_size 0 KB cache_swap_low 90 cache_swap_high 95 ipcache_size 2048 ipcache_low 90 ipcache_high 95 fqdncache_size 2048 ###### TAG: refresh_pattern refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern (Release|Package(.gz)*)$ 0 20% 2880 refresh_pattern . 0 20% 4320 ###### TAG: upgrade_http0.9 acl shoutcast rep_header X-HTTP09-First-Line ^ICY\s[0-9] upgrade_http0.9 deny shoutcast ###### TAG: broken_vary_encoding acl apache rep_header Server ^Apache broken_vary_encoding allow apache ###### TAG: extension_methods extension_methods REPORT MERGE MKACTIVITY CHECKOUT ###### TAG: hosts_file hosts_file /etc/hosts ###### TAG: coredump_dir coredump_dir /var/spool/squid ###### TAG: error_directory error_directory /usr/share/squid/errors/Portuguese
A evolução do Linux e as mudanças que se fazem necessárias desde o seu lançamento
Maquina modesta - a vez dos navegadores ferrarem o usuario
Fscrypt: protegendo arquivos do seu usuário sem a lentidão padrão de criptograr o disco
Faça suas próprias atualizações de pacotes/programas no Void Linux e torne-se um Contribuidor
Abrir um arquivo URL pelaLlinguagem C (2)
alguem tem o link do gamelinux? faz anos sem noticia (3)









