Brecha no Squid

1. Brecha no Squid

Guilherme
yathal

(usa Debian)

Enviado em 02/10/2012 - 17:15h

Boa Tarde pessoal, tenho um Debian com Squid rodando em uma rede e não tenho muita experiência com linux e gostaria que alguém me ajudasse.
Reparei a seguinte brecha no meu squid/iptables: eu fiz o bloqueio do facebook por iptables, ok, bloqueia mesmo que a pessoa tente acessar usando https.
Porém é um proxy autenticado, e no navegador firefox, se eu não configuro proxy e tento acessar pela porta https, abre qualquer site.

Alguém pode me ajudar a corrigir?


  


2. Re: Brecha no Squid

3. Re: Brecha no Squid

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 02/10/2012 - 20:15h

Eh amigo se desse uma procura veria que tem varios informações sobre https e proxy transparente, o squid não funfa de boa com essa combinação, tem varios artigos sobre isso, mas ate agora não vi nenhum que faça bloquear https em proxy transparente.


4. Re: Brecha no Squid

johnny borges
johnnyb

(usa Fedora)

Enviado em 02/10/2012 - 21:11h

amigo feche a porta


5. Re: Brecha no Squid

Guilherme
yathal

(usa Debian)

Enviado em 03/10/2012 - 08:11h

meu proxy não é transparente, eu tenho que configurar em todos os navegadores.
Amigo, para fechar a porta não causaria problemas em sites q precisam mesmo do 443?
Eu li nos tópicos que em proxy não transparente, é possível usar o squid para HTTPS e filtrar o conteúdo.


6. Re: Brecha no Squid

Reginaldo de Matias
saitam

(usa Slackware)

Enviado em 03/10/2012 - 09:22h

Para ninguém burlar o proxy autenticado deve ter a seguinte política abaixo.

* Iniciar tudo DROP
* Apenas liberar as portas dos serviços necessárias
* Jamais liberar as portas 80 e 443 na chain FORWARD, isso deve forçar passar no proxy squid

Desse forma, se alguém tentar retirar o IP:PORTA no navegador ficará sem acesso a internet, e também pode tentar https://facebook.com DENIED

Maiores informações:
http://mundodacomputacaointegral.blogspot.com.br/2011/12/configurando-servidor-proxy-autenticado.htm...


7. Re: Brecha no Squid

Guilherme
yathal

(usa Debian)

Enviado em 03/10/2012 - 14:41h

obrigado, vou dar uma lida e aviso se funcionou.


8. Re: Brecha no Squid

johnny borges
johnnyb

(usa Fedora)

Enviado em 07/10/2012 - 19:42h

:D ?eai amigo resolvel o bo


9. Re: Brecha no Squid

Guilherme
yathal

(usa Debian)

Enviado em 24/10/2012 - 13:33h

Ainda não consegui amigo, posso postar minhas configurações de Firewall aqui?


10. Re: Brecha no Squid

Reginaldo de Matias
saitam

(usa Slackware)

Enviado em 24/10/2012 - 13:39h

yathal escreveu:

Ainda não consegui amigo, posso postar minhas configurações de Firewall aqui?


pode colocar as regras iptables entre a tag [ code ] código [ / code ]


11. Re: Brecha no Squid

Guilherme
yathal

(usa Debian)

Enviado em 24/10/2012 - 13:45h

as regras no iptables -L são

Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ultrasurf all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- localhost anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere 200.18.118.12
ACCEPT all -- anywhere 189.42.17.115
ACCEPT all -- anywhere 200.180.118.11
ACCEPT all -- anywhere 200.180.118.64
ACCEPT all -- anywhere 189.42.17.120
ACCEPT all -- anywhere 200.180.118.65
ACCEPT all -- anywhere 189.42.17.121
ACCEPT tcp -- anywhere anywhere tcp dpt:3128
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 5/sec burst 5

Chain FORWARD (policy ACCEPT)
target prot opt source destination
fail2ban-ultrasurf all -- anywhere anywhere
LOG all -- anywhere 65.49.14.0/24 LOG level warning prefix `=UltraSurf='
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
REJECT all -- anywhere 65.54.165.177 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.19 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.165.136 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.47 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.77 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.17 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.165.169 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.10 reject-with icmp-port-unreachable
REJECT all -- anywhere 64.4.12.96 reject-with icmp-port-unreachable
ACCEPT tcp -- anywhere anywhere multiport dports smtp,pop3,submission
REJECT tcp -- anywhere anywhere multiport dports msnp,afs3-callback reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere multiport dports afs3-callback reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REJECT tcp -- anywhere anywhere multiport dports msnp,afs3-callback reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:afs3-callback reject-with icmp-port-unreachable

Chain fail2ban-ultrasurf (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere



12. Re: Brecha no Squid

Reginaldo de Matias
saitam

(usa Slackware)

Enviado em 24/10/2012 - 13:57h

yathal escreveu:

as regras no iptables -L são

Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ultrasurf all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- localhost anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere 200.18.118.12
ACCEPT all -- anywhere 189.42.17.115
ACCEPT all -- anywhere 200.180.118.11
ACCEPT all -- anywhere 200.180.118.64
ACCEPT all -- anywhere 189.42.17.120
ACCEPT all -- anywhere 200.180.118.65
ACCEPT all -- anywhere 189.42.17.121
ACCEPT tcp -- anywhere anywhere tcp dpt:3128
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 5/sec burst 5

Chain FORWARD (policy ACCEPT)
target prot opt source destination
fail2ban-ultrasurf all -- anywhere anywhere
LOG all -- anywhere 65.49.14.0/24 LOG level warning prefix `=UltraSurf='
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
REJECT all -- anywhere 65.54.165.177 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.19 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.165.136 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.47 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.77 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.17 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.165.169 reject-with icmp-port-unreachable
REJECT all -- anywhere 65.54.186.10 reject-with icmp-port-unreachable
REJECT all -- anywhere 64.4.12.96 reject-with icmp-port-unreachable
ACCEPT tcp -- anywhere anywhere multiport dports smtp,pop3,submission
REJECT tcp -- anywhere anywhere multiport dports msnp,afs3-callback reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere multiport dports afs3-callback reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REJECT tcp -- anywhere anywhere multiport dports msnp,afs3-callback reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:afs3-callback reject-with icmp-port-unreachable

Chain fail2ban-ultrasurf (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere


Não o resultado iptables -L e sim seu script firewall.




01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts