[Fedora-users-br] Proxy Transparente

Rafael Gomes rafael em gnufacs.org
Qua Nov 22 20:16:43 UTC 2006


Isso se o proxy for em outra maquina, pois se for no firewall (gateway) não
precisa!

Em 22/11/06, Felipe Tocchetto <felipe em tocchetto.com> escreveu:
>
> tente utilizar uma regra mais completa para ver se funciona:
>
> iptables -t nat -I PREROUTING 1 -s <$ip_rede_interna>/24 -p tcp
> --dport 80 -j DNAT --to-destination <$ip_do_proxy>:3128
>
>
> Em 22/11/06, PaTricK<patrick_rsl em yahoo.com.br> escreveu:
> >
> >
> > Pessoal quando eu faço o proxy... estou tendo que configura-lo
> manualmente
> > em cada cliente, ele nao fica transparente
> > Se alguém puder me ajuda... estou enviando o arquivo de config
> >
> >
> > Obrigado!
> >
> >
> >
> >
> >
> >
> > #Config Iptables para squid
> >
> > #/sbin/modprobe iptables_nat
> > iptables -F
> > iptables -t nat -F
> > iptables -P INPUT DROP
> > iptables -t nat -A PREROUTING -s 0/0 -p tcp --dport 80 -j REDIRECT
> --to-port
> > 3128
> > iptables -t nat -A PREROUTING -s 0/0 -p udp --dport 80 -j REDIRECT
> --to-port
> > 3128
> > visible_hostname patrick # Nome do computador
> >
> >
> >
> >
> >
> >
> > #Config Squid.conf
> >
> >
> >
> > http_port 192.168.1.1:3128
> > hierarchy_stoplist cgi-bin ?
> > cache_mem 100 MB
> > cache_swap_low 100
> > cache_swap_high 95
> > maximum_object_size 4096 KB
> > #cache_dir ufs /var/cache/squid 1000 16 256
> >
> > acl all src 0.0.0.0/0.0.0.0
> > acl manager proto cache_object
> > acl HTTP proto http
> > acl localhost src 127.0.0.1/255.255.255.255
> > acl SSL_ports port 443 563
> > acl Safe_ports port 80 # http
> > acl Safe_ports port 21 # ftp
> > acl smtp port 110 #
> > acl pop port 25 #
> > 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 Proibir_palavras url_regex -i
> > "/etc/squid/palavras/palavras.txt" #txt onde estão as
> > palavras a bloquear
> > acl libera_site url_regex -i "/etc/squid/palavras/libera.txt
> > acl libera_ip src 192.168.1.3/255.255.255.255
> >
> >
> > # Bloquear MSN
> > acl HOST_MSN src 192.168.1.1/255.255.255.0
> > acl proibir_msn url_regex -i "/etc/squid/palavras/msn.txt"
> > acl NEGAR_MSN2 url_regex "/etc/squid/palavras/msn2.txt"
> > acl msn url_regex -i /gateway/gateway.dll
> >
> >
> >
> > 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 901 # SWAT
> > acl purge method PURGE
> > acl CONNECT method CONNECT
> >
> > #http_access allow libera_ip
> > #http_access allow libera_site
> > #http_access deny all
> > 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
> >
> > #Bloqueio MSN
> > #http_access allow HOST_MSN
> > #http_access deny proibir_msn
> > #http_access deny Negar_MSN2
> > #http_access deny msn
> >
> >
> > visible_hostname patrick # Nome do computador
> > http_access allow smtp
> > http_access allow pop
> > http_access deny Proibir_palavras
> >
> >
> > acl redelocal src 192.168.1.0/24 # IP da sua Rede
> > http_access allow localhost
> > http_access allow redelocal
> >
> > http_access allow all
> >
> > --
> > Fedora-users-br mailing list
> > Fedora-users-br em redhat.com
> > https://www.redhat.com/mailman/listinfo/fedora-users-br
> >
> >
> >
>
>
> --
> Felipe L. Tocchetto
> http://felipe.tocchetto.com
>
> --
> Fedora-users-br mailing list
> Fedora-users-br em redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-users-br
>



-- 
Rafael Brito Gomes
Sistema de Informação
Universidade de Salvador (UNIFACS)

Linux User - 430086

O Tabareu - A Arte em sua forma mais Pura!
http://tabareu.wordpress.com/

Blog do Sinot
http://sinot.wordpress.com/
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listman.redhat.com/archives/fedora-users-br/attachments/20061122/1de1051b/attachment.htm>


Mais detalhes sobre a lista de discussão Fedora-users-br