maurolarrat
(usa Ubuntu)
Enviado em 16/05/2011 - 13:29h
Oi Renato,
aparentemente funcionou com o squid desta forma (incluí a porta 143 como vc disse)):
############################################################################
# Porta http do Squid.
############################################################################
# Squid normally listens to port 3128
http_port 3128 transparent
#visible_hostname FIREWALL
############################################################################
# ACLs de identificação da rede.
############################################################################
# localhost.
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
# Intranets.
acl INTRANET src 192.168.0.0/24
acl INTRANETWRL src 192.168.1.0/24
############################################################################
# ACLs que identificam as portas abertas na rede.
############################################################################
acl SSL_ports port 443 # https
acl SSL_ports port 444 # https
acl SSL_ports port 447 # https
acl SSL_ports port 143 # https imap
acl SSL_ports port 563 # https snews
acl SSL_ports port 7443 # https
acl SSL_ports port 873 # https rsync
acl SSL_ports port 10000 # https
acl Safe_ports port 80 # http
acl Safe_ports port 53 # DNS (UDP e TCP)
acl Safe_ports port 443 # http
acl Safe_ports port 143 # http imap
acl Safe_ports port 21 # ftp
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 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
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 3130 # 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
acl purge method PURGE
acl CONNECT method CONNECT
############################################################################
# ACLs que definem as permissões de acesso http.
############################################################################
# Para bloqueio do msn messenger.
acl MSNMESSENGER url_regex -i /gateway/gateway.dll
#acl MSNMESSENGER2 dstdomain "/etc/squid/bloqueados/sites"
acl MSNMESSENGER3 url_regex -i ADSAdClient31.dll
acl palavras_proibidas dstdom_regex -i "/etc/squid/bloqueados/sites"
# Para definir IPs liberados pelos bloqueios.
acl IPSLIBERADOS src "/etc/squid/liberados/ips"
############################################################################
# Regras de acesso http.
############################################################################
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Bloqueia o acesso http à portas não permitidas.
http_access deny !Safe_ports
# Bloqueia o acesso https à portas não permitidas.
http_access deny CONNECT !SSL_ports
http_access deny CONNECT !Safe_ports
# Libera para exceções.
http_access allow IPSLIBERADOS
# Bloqueia msn messenger.
http_access deny MSNMESSENGER MSNMESSENGER3
# Bloqueio por Palavras proibidas.
http_access deny palavras_proibidas
# Permite acesso à internet às nossas redes.
http_access allow INTRANET
http_access allow INTRANETWRL
http_access allow localhost
# Bloqueia acessos à internet para demais redes.
http_access deny all
# Permite requisições ICPs apenas das intranets.
icp_access allow INTRANET
icp_access allow INTRANETWRL
icp_access deny all
o iptables ficou assim, na parte do squid:
# HTTP/HTTPS (COM SQUID)
#FILTER
iptables -A INPUT -i $INTRA -p tcp -m multiport --dport 3128,3130 -j ACCEPT
iptables -A INPUT -i $INTRA -p tcp -m multiport --dport 80,443 -j ACCEPT
iptables -A FORWARD -p tcp -m multiport --dport 80,443 -j ACCEPT
#NAT Pré-roteamento Squid.
iptables -t nat -A PREROUTING -i $INTRA -p tcp --dport 80 -j REDIRECT --to-port 3128
vou deixar de quarentena, para ver ser o pop já está ok com o outlook.
valeu a ajuda ae ,