aioriaman
(usa BackTrack)
Enviado em 29/02/2012 - 13:00h
amigo, desculpe a demora, eu precisei viajar e não tive como monitorar o post.
A conf do iptables está apenas com a seguinte regra:
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
Já a conf do squid segue desta maneira:
http_port 3128 transparent
visible_hostname Servidor
cache_mem 128 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 150 MB
cache_dir ufs /var/spool/squid 5120 16 256
cache_access_log /var/log/squid/access.log
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 50
auth_param basic realm ENTRE COM SEU LOGIN E SENHA.
auth_param basic credentialsttl 2 hour
auth_param basic casesensitive off
############### IMPLEMENTOS #################
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin ?
no_cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
##############################################
acl aluno proxy_auth "/etc/squid/alunos"
acl adm proxy_auth "/etc/squid/adm"
acl professores proxy_auth "/etc/squid/prof"
acl comercial proxy_auth "/etc/squid/comercial"
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 21 80 443 563 70 210 280 488 59 777 901 1025-65535
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 msndll urlpath_regex -i gateway.dll
acl msnurl url_regex -i "/etc/squid/Restricoes/hotmail"
acl INTERVALO time F 08:00-22:00
acl relacionamento url_regex -i "/etc/squid/Restricoes/relacionamentos"
acl jogos url_regex -i "/etc/squid/Restricoes/jogos"
acl
[*****] url_regex -i "/etc/squid/Restricoes/pornos"
acl downloads urlpath_regex -i "/etc/squid/Restricoes/download"
acl videos rep_mime_type -i "/etc/squid/Restricoes/blockmime"
acl espertinhos url_regex -i "/etc/squid/Restricoes/espertinhos"
acl autenticacao proxy_auth REQUIRED
error_directory /usr/share/squid/errors/Portuguese
http_access allow localhost
http_access allow adm
http_access allow professores !
[*****]
http_access allow comercial !
[*****] !jogos
http_access allow aluno INTERVALO !
[*****] !downloads
http_reply_access deny aluno videos !INTERVALO
http_access allow aluno !videos !
[*****] !msndll !msnurl !jogos !espertinhos !relacionamento !downloads
#http_access allow autenticacao
http_access deny all
Desde já agradeço pela ajuda e mais uma vez peço desculpas pelo atraso.