Squid Transparente nao funciona [RESOLVIDO]

1. Squid Transparente nao funciona [RESOLVIDO]

Ronaldo
ronaz_d12

(usa Ubuntu)

Enviado em 14/08/2013 - 14:20h

Galera meu squid3 transparente não funciona mas se eu colocar no browser o squid pega normalmente



http_port 3128 transparent
visible_hostname JOTAG

#logs_de_acesso
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
cache_mem 512 MB
cache_dir ufs /var/spool/squid3 1000 16 256
#Atualizaç do cache
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280

#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
#acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl Safe_ports port 80 # http
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 465 # SMTP
acl Safe_ports port 110 # POP3
acl Safe_ports port 8017 # TED


acl purge method PURGE
acl CONNECT method CONNECT

acl redelocal src 192.168.1.0/24
acl sites_bloqueados dstdom_regex -i "/etc/squid3/sites/sites_bloqueados.txt"
acl sites_por_nome url_regex -i "/etc/squid3/sites/sites_por_nome.txt"

acl diretoria src "/etc/squid3/sites/diretoria.txt"
acl laboratorio src "/etc/squid3/sites/laboratorio.txt"

http_access allow diretoria
http_access allow laboratorio !sites_bloqueados !sites_por_nome


http_access deny manager
http_access deny SSL_ports
http_access allow purge localhost
http_access deny purge

http_access deny sites_bloqueados
http_access deny sites_por_nome
http_access allow redelocal

http_access allow localhost
http_access deny all



error_directory /usr/share/squid3/errors/Portuguese/


#--------------------------------------------------

iptables

iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -X

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

iptables -A INPUT -i lo -j ACCEPT

#SQUID
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
#iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

#Liberando porta 3128
iptables -A INPUT -i eth1 -p tcp --dport 3128 -j ACCEPT

#Libera a Porta do Windows Terminal Server
#iptables -t nat -I PREROUTING -s 0/0 -m tcp -p tcp -i eth0 --dport 3389 -j DNAT --to-destination 192.168.1.10

#bloqueio
iptables -A FORWARD -m iprange --src-range 192.168.1.1-192.168.1.255 -m string --algo kmp --from 1 --to 65535 --string "facebook" -j DROP
iptables -A FORWARD -m iprange --src-range 192.168.1.1-192.168.1.255 -m string --algo kmp --from 1 --to 65535 --string "orkut" -j DROP
iptables -A FORWARD -m iprange --src-range 192.168.1.1-192.168.1.255 -m string --algo kmp --from 1 --to 65535 --string "youtube" -j DROP
iptables -A FORWARD -m iprange --src-range 192.168.1.1-192.168.1.255 -m string --algo kmp --from 1 --to 65535 --string "skype" -j DROP
iptables -A FORWARD -m iprange --src-range 192.168.1.1-192.168.1.255 -m string --algo kmp --from 1 --to 65535 --string "ultrasurf" -j DROP

#Libera WEBMIN
iptables -A INPUT -p tcp --dport 10000 -j ACCEPT

#libetando ssh externa
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

#Garante que os pacotes voltem
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

#_____________________________________________________________________________________________________________________

#Liberando DNS "Se seu DNS for externo"
iptables -A FORWARD -i eth1 -p udp -m udp --dport 53 -j ACCEPT
iptables -A FORWARD -i eth0 -p udp -m udp --sport 53 -m state --state ESTABLISHED,RELATED -j ACCEPT

#Libera HTTPS
iptables -A FORWARD -p tcp --dport 443 -j ACCEPT

#Garante que os pacotes voltem
iptables -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT







Fico grato a quem me ajudar!


  


2. Re: Squid Transparente nao funciona [RESOLVIDO]

Ronaldo
ronaz_d12

(usa Ubuntu)

Enviado em 14/08/2013 - 14:26h

o meu resolv.conf ta assim

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN









Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts