Squid (squid.conf)

Controle por IP

Categoria: Networking

Software: Squid

[ Hits: 8.552 ]

Por: Slipkd


Este arquivo é para controle do Squid por endereço IP, com bloqueio de sites e extensões de arquivos utilizados por mim na distribuição SmoothWall.


visible_hostname locke

http_port 192.168.0.10:800

acl localnet src 192.168.0.0/255.255.255.0

cache_mem 128 MB
maximum_object_size_in_memory 512 KB

cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF

half_closed_clients off

cache_swap_high 100%
cache_swap_low 80%

shutdown_lifetime 3 seconds
icp_port 0

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_effective_user squid
cache_effective_group squid

pid_filename /var/run/squid.pid

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
error_directory /usr/local/squid/etc/smootherrors
emulate_httpd_log on
log_mime_hdrs off

forwarded_for off

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255

acl SSL_ports port 445 443 441 563
acl Safe_ports port 80          # http
acl Safe_ports port 81          # smoothwall http
acl Safe_ports port 21          # ftp 
acl Safe_ports port 445 443 441 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

#CONTROLE DE ACESSO POR HORÁRIO
acl semana time 7:00-18:00
acl sabado time 7:00-12:00

#CONTROLE DE ACESSO POR IP
acl maq_total src "/var/smoothwall/proxy/maq_total"
acl maq_restrito src "/var/smoothwall/proxy/maq_restrito"
acl maq_fatura src "/var/smoothwall/proxy/maq_fatura"
acl maq_antivirus src "/var/smoothwall/proxy/maq_antivirus"
acl maq_tempor src "/var/smoothwall/proxy/maq_tempor"
acl site_sexo url_regex "/var/smoothwall/proxy/site_sexo"
acl site_pornography url_regex "/var/smoothwall/proxy/site_pornography"
acl site_chat url_regex "/var/smoothwall/proxy/site_chat"
acl site_tipo url_regex -i "/var/smoothwall/proxy/site_tipo"
acl site_searches url_regex -i "/var/smoothwall/proxy/site_searches"
acl site_outros url_regex "/var/smoothwall/proxy/site_outros"
acl site_bancos url_regex "/var/smoothwall/proxy/site_bancos"
acl site_liberado url_regex "/var/smoothwall/proxy/site_liberado"
acl site_fatura url_regex "/var/smoothwall/proxy/site_fatura"
acl site_antivirus url_regex "/var/smoothwall/proxy/site_antivirus"
acl site_tempor url_regex "/var/smoothwall/proxy/site_tempor"
http_access allow localhost
http_access allow maq_total
http_access allow maq_restrito site_liberado
http_access allow maq_restrito site_bancos
http_access allow maq_fatura site_fatura
http_access allow maq_antivirus site_antivirus
http_access allow maq_tempor site_liberado
http_access allow maq_tempor site_bancos
http_access allow maq_tempor site_tempor
http_access deny site_sexo
http_access deny site_pornography
http_access deny site_chat
http_access deny site_tipo
http_access deny site_searches
http_access deny site_outros
http_access allow maq_restrito
http_access allow maq_tempor
#FIM DO CONTROLE DE ACESSO POR IP

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
##http_access allow localnet
http_access deny all

maximum_object_size 128000 KB
minimum_object_size 0 KB

cache_dir diskd /var/squid/cache 128 16 256

request_body_max_size 0 KB
reply_body_max_size 0 allow all

httpd_accel_host virtual 
httpd_accel_port 80 
httpd_accel_with_proxy on
httpd_accel_uses_host_header on 
  


Comentários
[1] Comentário enviado por reiferson em 28/08/2013 - 16:07h

Ola amigo

como faço essa configuração no Smooth wall


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts