no_identity99
(usa Fedora)
Enviado em 25/03/2009 - 09:22h
boas,
squid bloqueia mas nao redireciona.
##############squid.conf################
http_port 3128 transparent
visible_hostname escola.local
# Configuracoes de cache, dono, logs, errors
cache_effective_user squid
cache_effective_group squid
cache_mem 128 MB
cache_dir ufs /etc/squid/cache 10000 32 256
cache_access_log /etc/squid/logs/access.log
cache_log /etc/squid/logs/cache.log
cache_store_log /etc/squid/logs/store.log
error_directory /usr/share/squid/errors/Portuguese
#Actualização do cache
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
auth_param basic children 5
auth_param basic realm Terminais-Leves-Linux Proxy
auth_param basic credentialsttl 1 hours
auth_param basic casesensitive on
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# IP's da rede local com tudo liberado
acl ip_diretoria src "/etc/squid/ip_diretoria"
http_access allow ip_diretoria
# IP's da rede local bloqueados
acl ip_bloqueado src "/etc/squid/ip_bloqueado"
http_access allow ip_bloqueado
# Site bloqueado por domínio
acl dominio_bloqueado dstdomain "/etc/squid/dominio_bloqueado"
http_access deny dominio_bloqueado
# Regras de bloqueio de site por palavras
acl palavra url_regex -i "/etc/squid/palavras_negadas"
acl palavras_permitidas url_regex -i "/etc/squid/palavras_permitidas"
http_access deny palavra !palavras_permitidas
acl REDE_INTERNA src 192.168.0.0/24
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/255.255.255.255
acl Safe_ports port 10000 # webmin
acl Safe_ports port 631 # cups
acl Safe_ports port 901 # samba
acl SSL_ports port 443 563 1834 1863 4242 # SSL
acl Safe_ports port 80 8080 # 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 REDE_INTERNA
http_access allow manager localhost
http_access allow manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_reply_access allow all !REDE_INTERNA
icp_access allow all !REDE_INTERNA
http_access allow all
##############iptables -L##############
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
###############iptables -t nat -L##########
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 3128
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
alguem que me diga o que estou a fazer de errado, que ja nao sei o que fazer!!
p.s eth0 -rede local
eth1 -rede exterior