thiagomgt
(usa Debian)
Enviado em 10/07/2008 - 13:22h
Nem tenho esse dns_nameserver no squid.conf (estranho q já configurei em outros servidores esse mesmo script e n tive esse problema, e aqui funcionava normal, de uns dias p cá q ficou assim)
#################################
#### SQUID CLEAN MATRIZ #########
#################################
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 32 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 32 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 512 16 256
cache_access_log /var/log/squid/access.log
error_directory /usr/share/squid/errors/Portuguese
visible_hostname CleanMatriz
ftp_user thiagomgt@gmail.com
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
##################
## ACL de Redes ##
##################
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 acesso_restrito src "/etc/squid/acesso_restrito"
acl bloquear_ip src "/etc/firewall/ips_block_all"
acl liberar_ip src "/etc/squid/ips_liberados"
acl rede_clean src "/etc/squid/rede_clean"
################
#### Portas ####
################
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 587 # (email)
acl Safe_ports port 110 # (email)
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 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
http_access allow localhost
######################
## Regras de acesso ##
######################
# controle de downloads #
acl html rep_mime_type text/html
reply_body_max_size 0 allow html
reply_body_max_size 10485760 allow !liberar_ip all
# Proibir dominios #
acl proibidos dstdom_regex "/etc/squid/proibidos"
# Palavras (buscador) #
acl palavras url_regex -i "/etc/squid/palavras"
# Proibir downloads #
acl downloads urlpath_regex -i "/etc/squid/downloads"
# Sites autorizados #
acl sites_ok dstdom_regex "/etc/squid/sites_ok"
# Proibir MSN #
acl msn dstdomain loginnet.passport.com
acl msn2 req_mime_type -i ^application/x-msn-messenger$
acl msn3 url_regex -i gateway.dll?
acl msn4 url_regex -i tabs.asp?
acl msn5 port 1863
# Proibir Gtalk #
acl blocktalk url_regex -i mail.google.com/mail/channel/bind
######################
## Regras de ACESSO ##
######################
http_access deny msn
http_access deny msn2
http_access deny msn3
http_access deny msn4
http_access deny msn5
http_access allow liberar_ip
no_cache deny liberar_ip
always_direct allow liberar_ip
http_access deny bloquear_ip
http_access deny !rede_clean
http_access allow sites_ok
http_access deny palavras
http_access deny acesso_restrito
http_access deny proibidos
http_access deny downloads
http_access allow localhost
http_access allow rede_clean
http_access deny all
# modprobe iptable_nat
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A PREROUTING -i $placalocal -p tcp --dport 80 -j REDIRECT --to-port $porta
# iptables -t nat -A POSTROUTING -o $placainternet -j MASQUERADE