ehs171
(usa Ubuntu)
Enviado em 12/11/2009 - 20:02h
Boa noiet klebrr testei sua regra de ip tables mas nao obtive sucesso:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.0.1:3128
Alguem teria alguma outra dica? eu preciso configurar algo extra alem do squid.conf e da regra iptables?
Meu squid.conf
# Lembrar Muito importante desabilitar firewal e SELinux! da zica!
# Porta e modo de opercao do squid
# http_port 3128 transparent
#http_port 3128 transparent
http_port 192.168.0.254:3128 transparent
# Quandidade de memira para o cahce do squid
# cache_mem 256 mb
# define o tipo de armazenamento do cache = ufs
# define o espaco em disco que é utilizado
# cache_dir ufs /home/squid/cache 1000 16 256
# Log de Acesso
# Mostra quem acessou o que, dia e hora
# access_log /home/squid/logs/access.log
# cache_access_log /home/squid/logs/access.log
# inicio testes cahce -------------------------------------------------------------------------
# Configuracoes de cache, dono, logs, errors
cache_effective_user squid
cache_effective_group squid
cache_mem 128 MB
# cache_dir ufs /etc/squid/cache 1000 16 256
cache_dir diskd /home/squid/cache 10000 32 256 Q1=64 Q2=72
# cache_dir diskd /etc/squid/cache 10000 32 256 Q1=64 Q2=72
cache_access_log /home/squid/logs/access.log
cache_log /home/squid/logs/cache.log
cache_store_log /home/squid/logs/store.log
# Atualizaçã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 PMJ-BA Proxy
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#fim testes Cache ----------------------------------------------------------------------------
# Log de erros do squid
# cache_log /home/squid/logs/cache.log
# Detalha objeto da web armazenado
# cache_store_log /home/squid/logs/store.log
# Nome do Proxy
visible_hostname Proxy.unimake
# Mostra quem eh o usuario e o grupo do squid
# cache_effective_user squid
# cache_effective_group squid
# INICIO DAS REGRAS DE BLOQUEIO -------------------------------------------------------------
# http_access = permine ou proibe o acesso
# Lembre: deny = bloqueio | allow = liberar
# FIM DAS REGRAS DE BLOQUEIO ----------------------------------------------------------------
# define a sua rede para o squid
acl rede_interna src 192.168.0.0/24
acl all src 0.0.0.0/0.0.0.0
# ACL portas
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
# validacao das redes!
http_access deny all !rede_interna
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
#http_access allow Safe_ports
http_access deny CONNECT !SSL_ports
http_reply_access deny all !rede_interna
icp_access deny all !rede_interna
# Altera a Menssagen de erro para o portugues!
error_directory /usr/share/squid/errors/Portuguese