gmanzali
(usa Debian)
Enviado em 24/03/2015 - 03:06h
Boa noite pessoal.
Seguinte atualmente tenho um squid3 rodando normalmente com essas configurações abaixo:
http_port 3128
visible_hostname cerbero.lider.local
cache_mgr ti@lidercobranca.com.br
error_directory /usr/share/squid3/errors/Portuguese
hierarchy_stoplist cgi-bin ?
cache_mem 256 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 100 MB
cache_dir ufs /var/spool/squid3 2040 16 256
refresh_pattern ^ftp: 360 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
access_log /var/log/squid3/access.log
acl localhost src 127.0.0.1/32
acl localnet src 192.168.0.0/24
## PAGINA DE ERRO EM PORTUGUES
error_directory /usr/share/squid3/errors/pt-br
######## ESQUEMA DE CONTROLE POR GRUPOS DE IP ##########
## Acesso restrito
acl acesso_restrito src "/etc/squid3/listas/ip_restrito"
acl url_bloqueado url_regex -i "/etc/squid3/listas/url_bloqueado"
acl url_liberado url_regex -i "/etc/squid3/listas/url_liberado"
http_access deny url_bloqueado
http_access deny acesso_restrito !url_liberado
## Acesso somente a sites liberados
acl acesso_bloqueado src "/etc/squid3/listas/ip_bloqueado"
http_access allow url_liberado
http_access deny acesso_bloqueado
## Acesso total
acl blq_facebook url_regex -i "/etc/squid3/listas/url_facebook"
acl acesso_livre src "/etc/squid3/listas/ip_livre"
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
acl Safe_ports port 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
acl Safe_ports port 488 # gss-http
acl Safe_ports port 563 # mntps
acl Safe_ports port 591 # filemaker
acl Safe_ports port 633 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # swat
acl Safe_ports port 1025-65535 # unregistered ports
http_access deny !Safe_ports
acl connect method CONNECT
acl ssl_ports port 443 # https
acl ssl_ports port 563 # mntps
acl ssl_ports port 873 # rsync
http_access deny connect !SSL_ports
##### END #####
porém estou tentando substituir por este que segue abaixo para controle juntamente com o AD... todo o esquema com o ad já está pronto e funcionando, porém quando altero o arquivo do squid o mesmo para de funcionar.
http_port 3128
visible_hostname cerbero.lider.local
cache_mgr ti@lidercobranca.com.br
error_directory /usr/share/squid3/errors/Portuguese
hierarchy_stoplist cgi-bin ?
cache_mem 256 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 100 MB
cache_dir ufs /var/spool/squid3 2040 16 256
refresh_pattern ^ftp: 360 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
access_log /var/log/squid3/access.log
acl localhost src 127.0.0.1/32
acl localnet src 192.168.0.0/16
## PAGINA DE ERRO EM PORTUGUES
error_directory /usr/share/squid3/errors/pt-br
# As linhas abaixo se referem a autenticação de usuários no AD
auth_param basic program /usr/lib/squid3/squid_ldap_auth -R -b "dc=lider,dc=local" -D "cn=proxy_user,ou=LIDER,dc=lider,dc=local" -w "naointeressa" -f sAMAccountName=%s -h 192.168.0.1
auth_param basic realm Squid proxy-caching web server
auth_param basic children 5
auth_param basic credentialsttl 2 hours
emulate_httpd_log on
mime_table /usr/share/squid3/mime.conf
pid_filename /usr/local/squid/var/logs/squid.pid
unlinkd_program /usr/lib/squid3/unlinkd
# ACL externa para autenticação nas bases LDAP do PDC
external_acl_type ldap_group %LOGIN /usr/lib/squid3/squid_ldap_group -R -b "dc=lider,dc=local" -D "cn=proxy_user,ou=LIDER,dc=lider,dc=local" -w "naointeressa" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,ou=LIDER,dc=lider,dc=local))" -h 192.168.0.1
# A ACL abaixo barra download de arquivos com extensões exe mp3 wma wmv mpg avi asf
acl block_arq urlpath_regex -i .com$ .exe$ .scr$ .mp3$ .mpeg$ .wma$ .wmv$ .mpg$ .avi$ .pif$
#QUEM
# ACLs_ACTIVE_DIRECTORY
acl g_administrativo external ldap_group G_Administrativo
acl g_atendimento external ldap_group G_Atendimento
acl g_diretoria external ldap_group G_Diretoria
acl g_encarregados external ldap_group G_Encarregados
acl g_financeiro external ldap_group G_Financeiro
acl g_gerencia external ldap_group G_Gerencia
acl g_juridico external ldap_group G_Juridico
acl g_monitoria external ldap_group G_Monitoria
acl g_operacao external ldap_group G_Operacao
acl g_relacionamento external ldap_group G_Relacionamento
acl g_rh external ldap_group G_RH
acl g_ti external ldap_group G_TI
acl g_treinamento external ldap_group G_Treinamento
acl g_vendas external ldap_group G_Vendas
acl g_download external ldap_group G_Download #Libera download de arquivo com extensões bloqueadas.
#O QUE
acl url_liberado url_regex -i "/etc/squid3/listas/url_liberado"
acl url_bloqueado url_regex -i "/etc/squid3/listas/url_bloqueado"
#QUEM PODE O QUE
http_access allow g_administrativo !url_bloqueado
http_access allow g_atendimento !url_bloqueado
http_access allow g_diretoria
http_access allow g_encarregados !url_bloqueado
http_access allow g_financeiro !url_bloqueado
http_access allow g_gerencia !url_bloqueado
http_access allow g_juridico !url_bloqueado
http_access allow g_monitoria !url_bloqueado
http_access allow g_relacionamento !url_bloqueado
http_access allow g_rh !url_bloqueado
http_access allow g_ti
http_access allow g_download block_arq
http_access deny g_operacao !url_liberado
http_access deny g_treinamento !url_liberado
http_access deny g_vendas !url_liberado
############ AUTENTICACAO DO PROXY #############
acl autentica proxy_auth REQUIRED
http_access allow autentica
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
acl Safe_ports port 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
acl Safe_ports port 488 # gss-http
acl Safe_ports port 563 # mntps
acl Safe_ports port 591 # filemaker
acl Safe_ports port 633 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # swat
acl Safe_ports port 1025-65535 # unregistered ports
http_access deny !Safe_ports
acl connect method CONNECT
acl ssl_ports port 443 # https
acl ssl_ports port 563 # mntps
acl ssl_ports port 873 # rsync
http_access deny connect !SSL_ports
no syslog fica a seguinte mensagem quando tento acessar alguma pagina da web.
Mar 24 02:42:44 cerbero (squid): Could not write pid file
Mar 24 02:42:44 cerbero squid[26112]: Squid Parent: child process 26170 exited due to signal 6 with status 0
Mar 24 02:42:47 cerbero squid[26112]: Squid Parent: child process 26183 started
estou utilizando o Debian 7