Re: :: ACL SQUID :: Bloquear faixa IP e Liberar alguns IPs.
xstefanox
Minha pergunta seria, eu não estaria bloqueando todo acesso a navegação colocando deny para range2? Por que meu intuito é bloquear o conteudo do arquivo apenas para a range2. A range1 e rang3 teria acesso a internet inrestrito.
http_access deny webmail_block range2
A configuração de acls não funcionou, bloqueou tudo para todas as ranges, mas em teste eu colocando apenas ip's, funciona.
P. ex:
acl range1 src 192.168.11.1 192.168.11.2 192.168.11.3 .... 192.168.11.19
Desda maneira funciona, mas seria um tanto qdo trabalhoso digitar todos os ip's.
Atenciosamente
Re: :: ACL SQUID :: Bloquear faixa IP e Liberar alguns IPs.
Como estão as suas ACL's?
Re: :: ACL SQUID :: Bloquear faixa IP e Liberar alguns IPs.
coloque para bloquear a rede toda entao.... por exemplo 192.168.0/24 na acl ............. valew!!!
Re: :: ACL SQUID :: Bloquear faixa IP e Liberar alguns IPs.
Segue o squid.conf para analise:
visible_hostname fw-01.frato
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# config das regras de acesso
acl all src 0.0.0.0/0.0.0.0
acl rede_interna src 192.168.11.0/255.255.255.0
#acl range1 src 192.168.11.1-192.168.11.19
#acl range2 src 192.168.11.20-192.168.11.179
#acl range3 src 192.168.11.180-192.168.11.254
#acl navegacao_full src 192.168.11.21
#acl download_negado url_regex -i ftp .mov .mpeg .wav .tar .mp3 .avi .asf
#acl permitidos dstdomain "etc/squid/permitidos"
acl webmail_block dstdom_regex -i "/proxy/txts/webmail_block.txt"
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 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 # 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
http_access allow manager localhost
#http_access deny negados
#http_access allow navegacao_full
#http_access deny download_negado
#http_access allow permitidos
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
#http_access allow range1 range3
http_access deny webmail_block
#http_access allow range2
http_access allow rede_interna
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /proxy/logs
#Config do cache
cache_mem 128 MB
cache_dir ufs /proxy/logs 20000 16 256
cache_access_log /proxy/logs/access.log
cache_log /proxy/logs/cache.log
cache_store_log /proxy/logs/store.log
cache_effective_user squid
cache_effective_group squid
cache_mgr [email protected]
#Config proxy transparente
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
Atenciosamente
Re: :: ACL SQUID :: Bloquear faixa IP e Liberar alguns IPs.
Puta, que zona, hauehaeuhaeuae.
Código :
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 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 # 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
# ACL's para definição de redes
acl all src 0.0.0.0/0.0.0.0.0
acl range1 src 192.168.11.1-192.168.11.19
acl range2 src 192.168.11.20-192.168.11.179
acl range3 src 192.168.11.180-192.168.11.254
# ACL's para controle de acesso
acl blocked url_regex -i "/etc/squid/lists/blocked"
acl unblocked url_regex -i "/etc/squid/lists/unblocked"
acl blocked_extensions urlpath_regex -i "/etc/squid/lists/blocked_extensions"
acl webmails url_regex -i "/etc/squid/lists/webmails
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
# HTTP_ACCESS
http_access deny blocked !unblocked
http_access deny blocked_extensions
http_access allow range1
http_access allow range3
http_access deny webmails
http_access allow range2
http_access deny all
Testado e comprovado.