kleoliveira
(usa Debian)
Enviado em 18/06/2015 - 11:14h
Assumi um squid que deveria gerenciar o seguinte cenário:
- permitir acesso livre (gerencia & diretoria)
- bloquear redes sociais (para todos usuários)
- permitir acesso a bancos, etc (para todos usuários)
atualmente o squid não consegue realizar as regras acima e para piorar a situação mudou um pouco.
Agora é preciso bloquear 'redes sociais' para alguns usuários da 'gerencia'.
Pensei em uma regra que bloqueasse redes sociais para todos usuários, e fosse liberando por ip, mas afeta o
serviço dos bancos e demais sites https.
Irei postar o squid.conf atual, mas como mencionei acima, eu assumi este squid, então não consigo compreender
muito bem a lógica usada pelo antigo administrador, se alguém puder ajudar, agradeço.
***********************************************************
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 128 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 1024 16 256
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
maximum_object_size 4096 KB
maximum_object_size_in_memory 512 KB
logfile_rotate 0
memory_pools Off
detect_broken_pconn on
pipeline_prefetch on
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
auth_param ntlm program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
auth_param ntlm children 30
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
auth_param basic children 5
auth_param basic realm Soft-line Proxy server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl SSL_ports port 444 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl SSL_ports port 9443 # Farmacia Popular
acl Safe_ports port 80 # http
acl Safe_ports port 90 # Itamarati
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 444 # https
acl Safe_ports port 563 # snews
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
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl our_networks src 192.168.0.0/24
acl completo src "/etc/squid3/regras/completo.dat"
acl p*rno url_regex "/etc/squid3/regras/p*rno.dat"
acl livre url_regex -i "/etc/squid3/regras/livre.dat"
acl direto dstdomain "/etc/squid3/regras/direto.dat"
http_access allow completo
http_access deny p*rno
http_access deny p*rn
http_access allow direto
http_access allow our_networks livre
http_access deny all
http_reply_access allow all
icp_access allow all
miss_access allow all
dns_nameservers 127.0.0.1
dns_nameservers 8.8.4.4
dns_nameservers 200.204.0.10
dns_nameservers 187.17.160.2
cache_effective_user proxy
cache_effective_group proxy
error_directory /usr/share/squid3/errors/Portuguese