Squid com Autenticação

1. Squid com Autenticação

renato
djskolman

(usa Ubuntu)

Enviado em 01/02/2017 - 15:48h

Eu to fazendo um servidor novo e não to conseguindo fazer o squid funcionar com minha conf atual. Eu tenho Ubuntu server 12,04 e instalei agora o Ubuntu server 16,04. Eu instalei o squid, mas quando jogo minha conf algo da errado. Os navegadores falam que o proxy está recusando conexão e não chega nem pedir a senha do usuário.

Obrigado a todos, e espero que possa ajudar.

Segue minha configuração do squid.

#############################
auth_param basic children 15
auth_param basic realm ENTRE COM SEU LOGIN E SENHA
auth_param basic credentialsttl 2 hours
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
acl manager proto cache_object
acl localnet src 192.168.10.0/24 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 110 # pop
acl Safe_ports port 443 # https
acl Safe_ports port 52182 # 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

#################################
#Declarando as listas de acesso#
#################################


#acl microsoft url_regex "/etc/squid/acl/ms-update"
#acl domain_watson dstdomain watson.microsoft.com
#http_access allow microsoft
#http_access allow domain_watson

#####################################################################

acl microsoft url_regex "/etc/squid/acl/office"
http_access allow microsoft

acl usuarios_liberados proxy_auth "/etc/squid/acl/usuarios_liberados"

acl what_allow proxy_auth "/etc/squid/acl/what_allow"

acl diretoria proxy_auth "/etc/squid/acl/diretoria"

acl user_deny proxy_auth "/etc/squid/acl/user_deny"

acl allowed_users proxy_auth "/etc/squid/acl/allowed_users"

acl produtivo url_regex -i "/etc/squid/acl/produtivo"

acl gwrp proxy_auth -i "/etc/squid/acl/riberar"

acl improdutivo url_regex -i "/etc/squid/acl/improdutivo"

acl whatw url_regex -i "/etc/squid/acl/whatw"

###############################

# Politicas das ACLsi

http_access allow all produtivo
http_access allow gwrp
http_access deny user_deny
http_access deny all improdutivo
http_access allow what_allow
http_access deny whatw
http_access allow allowed_users
http_access allow diretoria
http_access allow all produtivo
http_access deny all improdutivo
http_access allow usuarios_liberados
http_access allow all produtivo
http_access deny all improdutivo
http_access deny all


acl url url_regex -i "/etc/squid/acl/palavrasproibidas"
http_access deny url

######################################



http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access allow CONNECT !SSL_ports
http_access allow localnet

http_access deny all
icp_access allow localnet
icp_access deny all

http_port 3128 transparent

cache_mem 1024 MB

cache_swap_low 90
cache_swap_high 95

#maximum_object_size 10240 MB
#minimum_object_size 0 KB
#maximum_object_size_in_memory 64 KB

#range_offset_limit 400 MB windowsupdate
#maximum_object_size 400 MB
#quick_abort_min -1

#maximum_object_size 1024 MB
#minimum_object_size 0 KB
#cache_swap_low 90
#cache_swap_high 95

#cache_dir ufs /var/cache/squid 30720 16 256

cache_dir ufs /var/cache/squid 102400 64 256
access_log /var/log/squid/access.log squid
# client_netmask 255.255.255.255
#Suggested default:



#refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims

#refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims

#refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims



refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

acl apache rep_header Server ^Apache
#acl Allowed_users proxy_auth tereza nayara elisangela
#broken_vary_encoding allow apache


coredump_dir /var/cache/squid


store_avg_object_size 2 GB
#http_reply_access deny



  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts