squid heeelllllppp [RESOLVIDO]

1. squid heeelllllppp [RESOLVIDO]

Magaw
garoto200x@hotma

(usa Slackware)

Enviado em 28/04/2011 - 09:45h

Meu squid nao esta bloqueando com proxy transparente, sou mega novato em linux. ( slack )

Segue meu .conf

( se alguem puder me passar um .conf com bloqueio de site ficaria muito agradecido )


http_port 3128 transparent
access_log /var/squid/logs/access.log squid

#cache_effective_user squid
#cache_effective_group squid

cache_store_log none

#Examples:
#acl macaddress arp 09:00:2b:23:45:67
#acl myexample dst_as 1241
#acl password proxy_auth REQUIRED
#acl fileupload req_mime_type -i ^multipart/form-data$
#acl javascript rep_mime_type -i ^application/x-javascript$
#Recommended minimum configuration:

acl all src 0.0.0.0/0.0.0.0
acl rede_interna src 192.168.1.0/255.255.255.0
acl Sitesblock dstdomain "/etc/squid/block.txt"
acl liberados url_regex -i "/etc/squid/liberados.txt"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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 CONNECT method CONNECT
acl skypedomain dstdomain skype.com
#acl Internet_Total external unix_group internettotal
#acl Internet_Telemarketing external unix_group internettmkt
#acl Internet_Restrita external unix_group internetrestrita
#acl liberados url_regex -i "/etc/squid/liberados.txt"
#acl telemarketing url_regex -i "/etc/squid/telemarketing.txt"
#acl restrita url_regex -i "/etc/squid/restrita.txt"

#acl sextafeira time F 12:00-13:15
#acl quintafeira time H 12:00-13:15
#acl quartafeira time W 12:00-13:15
#acl tercafeira time T 12:00-13:5
#acl segundafeira time M 12:00-13:15


#Default:
http_access deny rede_interna
#http_access allow rede_interna
#http_access allow liberados
#http_access deny restrita
http_access deny manager
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
http_access deny all

Grato a todos.


  


2. Re: squid heeelllllppp [RESOLVIDO]

Eriton Almeida
eritonalmeida

(usa Debian)

Enviado em 28/04/2011 - 11:28h

vc ta fazendo o REDIRECT da porta 80 com o firewall?


3. squid heeelllllppp

Magaw
garoto200x@hotma

(usa Slackware)

Enviado em 28/04/2011 - 11:49h

E isso ?

$iptables -t nat -A PREROUTING -i $IF_EXTERNA -p tcp --dport 80 -j REDIRECT --to-port 3128


4. Re: squid heeelllllppp [RESOLVIDO]

Eriton Almeida
eritonalmeida

(usa Debian)

Enviado em 28/04/2011 - 12:23h

no caso $IF_EXTERNA tem q ser a placa de rede interna, não é esse o problema?


5. Re: squid heeelllllppp [RESOLVIDO]

Magaw
garoto200x@hotma

(usa Slackware)

Enviado em 28/04/2011 - 16:26h

Eriton obrigado pela sua dica, esta tudo funfando.

Waleu


6. Re: squid heeelllllppp [RESOLVIDO]

Natanael Henrique
n4t4n

(usa Arch Linux)

Enviado em 28/04/2011 - 19:09h

Posta de forma mais clara a solução do problema e marca o tópico como resolvido pra ajudar a galera que pesquisa pelo mesmo problema, ok?


7. Re: squid heeelllllppp [RESOLVIDO]

Magaw
garoto200x@hotma

(usa Slackware)

Enviado em 12/05/2011 - 08:34h

Bom dia a todos.

Tinha muitas coisas erradas que precisavam ser organizadas e refeitas.

A 1 colocar tudo em ordem para poder me achar.

A 2 era a ordem das permissões, que se olharem la no squid, ele terminava negando todos os acessos.

A 3 era criar o http_access deny o "nome do arquivo que criei com a lista de site bloqueados" ( acl Sitesblock dstdomain "/etc/squid/block.txt" ).

E 4 corrigir o firewall, esta assim:

#$iptables -t nat -A PREROUTING -i $IF_EXTERNAL -p tcp --dport 80 -j REDIRECT --to-port 3128

e na verdade, deveria estar assim:

#$iptables -t nat -A PREROUTING -i $IF_INTERNAL -p tcp --dport 80 -j REDIRECT --to-port 3128

Com essas correções consegui fazer os bloqueios, adicionar mais acls e liberar so por IP's

Obrigado a todos que me ajudarão. Espero poder ajudar outro também.



  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts