maurolarrat
(usa Ubuntu)
Enviado em 10/05/2011 - 12:29h
Olá amigos,
Configurei um squid transparente. Mas todas as vezes que direciono (iptables) o acesso pela porta80 à porta do squid, o acesso a internet para. Estou fazendo o bloqueio com iptables mas gostaria de usar o squid.
Aqui está meu conf.
##################################################################################
# Configurações iniciais do SQUID
##################################################################################
# Porta SQUID.
http_port 3128 transparent
# Nome do Proxy visível no bloqueio.
visible_hostname teste
# E-mail que aparece para contato na página de bloqueio.
cache_mgr teste.ti@teste.com.br
##################################################################################
# Configurações dos LOGs do SQUID (aponte para /dev/null para não armazenar logs)
##################################################################################
cache_log /etc/squid/logs/cache.log
cache_access_log /etc/squid/logs/access.log
cache_store_log none
##################################################################################
# Declaração das ACLs para identificação da intranet.
##################################################################################
acl All src 0.0.0.0/0.0.0.0 # Todos as redes possíveis.
acl Manager proto cache_object #
acl CONNECT method CONNECT #
acl purge method PURGE #
acl localhost src 127.0.0.1/255.255.255.255 # Aponta para a máquina local.
acl INTRANET src 192.168.0.0/24 # Endereço da intranet.
acl INTRANETWRL src 192.168.1.0/24 # Endereço da intranet wireless.
##################################################################################
# Declaração das ACLs para liberação de portas.
##################################################################################
# Portas liberadas
acl SSL_ports port 443 # https
acl SSL_ports port 563 #
acl Safe_ports port 80 # http
acl Safe_ports port 22 # ftp
acl Safe_ports port 53 # DNS
acl Safe_ports port 210 # wais
acl Safe_ports port 70 # gopher
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 1025-65535 # unregistered ports
acl Safe_ports port 3456 # RECEITANET
acl Safe_ports port 95 # AND SAT
acl Safe_ports port 3307 # AND SAT
acl Safe_ports port 8080 # CONSULTA NÚMERO
acl Safe_ports port 587 # TURBOSITE SMTP
acl Safe_ports port 25 # TURBOSITE SMTP
acl Safe_ports port 110 # TURBOSITE POP3
acl Safe_ports port 993 # GMAIL IMAP
acl Safe_ports port 465 # GMAIL SMTP
acl Safe_ports port 5900 # VNC
acl Safe_ports port 5500 # VNC
acl Safe_ports port 5800 # VNC
acl Safe_ports port 30000 # BRADESCO
acl Safe_ports port 3128 # Squid
acl Safe_ports port 3388 # Sisloc
acl Safe_ports port 3389 # Sisloc
acl Safe_ports port 3389 # Sisloc
acl Safe_ports port 1433 # Sisloc
acl Safe_ports port 1434 # Sisloc
acl Safe_ports port 47 # Sisloc
acl Safe_ports port 10001-10220 # VNC Sisloc
acl Safe_ports port 8080 # Câmeras GGB
acl Safe_ports port 8010 # Câmeras NG
acl Safe_ports port 5050 # Câmeras NG
acl Safe_ports port 6050 # Câmeras NG
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
http_access allow INTRANET
http_access allow INTRANETWRL
icp_access allow INTRANET
icp_access allow INTRANETWRL
http_access deny All
icp_access deny All
minha regra no iptables:
# HTTP
#iptables -t nat -A PREROUTING -i $INTER -p tcp --dport 80 -j DNAT --to 192.168.0.1:3128
#iptables -t nat -A PREROUTING -i $INTRA -p tcp --dport 80 -j REDIRECT --to-port 3128
qualquer dica ajuda, valeu!