@Maikel una de las configuraciones de squid más completas y mejor explicadas
que he visto gracias por compartirla voy a hacer el intento de enriquecerla
un poco, el tipo de autenticación que propones debajo es mysql no se lo
especificaste a @frank junto con la línea del tipo de autenticación debe
poner los datos de conexión a la BD y demás opciones:
auth_param basic program /usr/lib/squid/squid_db_auth --user someuser
--password somepassword --md5 --persist
hay otras opciones para squid_db_auth
donde esta --md5 puede usarse --plaintext(quiere decir que el password
estará en texto plano en la bd)
--table(si quieres crear una table para los usuarios diferente a la table
por defecto)
Database table. Default "passwd".
--usercol(lo mismo que secede con --table pero esto para los campos user y
password de la tabla)
Username column. Default "user".
--passwdcol
Password column. Default "password"

instalando mysql
#aptitude install mysql-server mysql-client
creando la bd para squid 
#mysql –u root –p
mysql> create database squid;
mysql> grant select on squid.* to someuser @localhost identified by
somepassword;

mysql> CREATE TABLE `passwd` (
  `user` varchar(32) NOT NULL default '',
  `password` varchar(35) NOT NULL default '',
  `enabled` tinyint(1) NOT NULL default '1',
  `fullname` varchar(60) default NULL,
  `comment` varchar(60) default NULL,
  PRIMARY KEY  (`user`)
);

Para verificar la autenticacion contra la BD mysql 
/usr/local/squid/libexec/squid_db_auth --user someuser --password
somepassword --md5 --persist


Best Regards.
 
--
Ing. Rafael Lorente Salgueiro
Jefe Grupo de Informatica
Grupo de Turismo Gaviota S.A. / Complejo de Turismo Topes de Collantes
s  (53) (42) 540273 | (42) 540330 ext 3010
Linux-User:#418573 
“Nunca dejes que nadie te diga que no puedes hacer algo. Si tienes un sueño
tienes que protegerlo, las personas que no son capaces de hacer algo te
diran que tu tampoco puedes. Si quieres algo ve por ello y punto”
-----Mensaje original-----
De: gutl-l-boun...@jovenclub.cu [mailto:gutl-l-boun...@jovenclub.cu] En
nombre de maikel
Enviado el: Monday, October 27, 2014 6:55 AM
Para: Lista cubana de soporte técnico en Tecnologias Libres
Asunto: Re: [Gutl-l] una de squid

mira el error esta en la linea que dice

auth_param basic /usr/lib/squid3/ncsa_auth /etc/squid3/passwd

que no es asi es como la que te pongo debajo

auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd

de todas maneras te envio un fichero semejante al tuyo pero con otro tipo de
autenticacion ok




El 25/10/14 a las 08:25, Frank De los Reyes escribió:
> Saludos Lista  Tengo ubuntu server 1204 y estoy configurando el squid3 
> para que auntentifique usando el htpasswd pero al agregarle los 
> parametros para la autentificacion no me inicia usando service squid3 
> restart me dice unknow stop si le quito lo de la autentificacion me 
> inicia sin problemas aqui les pongo la conf que tengo ahora
>
>  Recommended minimum configuration:
>
>
> #
> acl manager proto cache_object
> acl localhost src 127.0.0.1/32 ::1
> acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
>
> # Example rule allowing access from your local networks.
> # Adapt to list your (internal) IP networks from where browsing
> # should be allowed
> acl ip src "/etc/squid3/acls/ip"
>
> auth_param basic /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
> auth_param basic realm squid
> auth_param basic children 5
> auth_param basic credentialsttl 1 hours
> auth_param basic casesensitive off
>
>
> acl pass proxy_auth REQUIRED
> #acl pass proxy_auth "/etc/squid3/passwd"
>
> 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
>
> # Recommended minimum Access Permission configuration:
> #
> # Only allow cachemgr access from localhost
> http_access allow manager localhost
> http_access deny manager
>
> # Deny requests to certain unsafe ports
> http_access deny !Safe_ports
>
> # Deny CONNECT to other than secure SSL ports
> http_access deny CONNECT !SSL_ports
>
> #
> # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
> #
>
> # Example rule allowing access from your local networks.
> # Adapt localnet in the ACL section to list your (internal) IP networks
> # from where browsing should be allowed
> http_access allow ip
> http_access allow pass
> http_access allow localhost
>
> # And finally deny all other access to this proxy
> http_access deny all
>
>
> # Squid normally listens to port 3128
> http_port 3128
>
> #Default:
> cache_mem 256 MB
>
> #  TAG: maximum_object_size_in_memory    (bytes)
> # Add any of your own refresh_pattern entries above these.
> refresh_pattern ^ftp:        1440    20%    10080
> refresh_pattern ^gopher:    1440    0%    1440
> refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
> refresh_pattern (Release|Packages(.gz)*)$      0       20% 2880
>
>
> #    This sets the maximum number of connection attempts for a
>
>
>

-- 
                                                       Maikel Rivas González
                                                            Admin Red
                                                      Cardiocentro
Pediátrico
                                                            William Soler



Correo enviado por el servicio de mensajería interna del Cardiocentro
Pediátrico William Soler.

-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

------------ próxima parte ------------
############################################################################
##
##                    HOSPITAL CARDIOCENTRO PEDIATRICO
##
##                              "William Soler"
##
##
##
##                  Elavorado por: Maikel Rivas Gonzalez
##
############################################################################
##

# -------------------------------------- #
#       METODO DE AUTENTICACION          #
# -------------------------------------- #

auth_param basic program /usr/lib/squid3/squid_db_auth
auth_param basic children 5
auth_param basic realm Proxy Cardiocentro Pediatrico William Soler
auth_param basic credentialsttl 15 minute 
auth_param basic casesensitive on
redirect_children 5

# ------------------------------------------ #
#   REGLAS DE CONTROL DE ACCESO DE FABRICA   #
# ------------------------------------------ #

acl manager proto cache_object
acl localhost src 127.0.0.1

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 purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access allow localhost
http_access deny all !Safe_ports
http_access deny CONNECT !SSL_ports

# --------------------------------------------- #
#   REGLAS DE CONTROL DE ACCESO PARA CLIENTES   #
# --------------------------------------------- #

acl internet proxy_auth "/etc/squid3/export/internet"
acl nacional proxy_auth "/etc/squid3/export/nacional"
acl penalizados proxy_auth "/etc/squid3/export/penalizados"
acl usuarios_social proxy_auth "/etc/squid3/datos/usuarios_social"
acl desabilitado proxy_auth "/etc/squid3/export/desabilitado"

acl sitios_salud dstdomain -i "/etc/squid3/datos/sitios_salud"
acl sitios_deny_social dstdomain -i "/etc/squid3/datos/sitios_deny_social"
acl sitios_deny_internet dstdomain -i
"/etc/squid3/datos/sitios_deny_internet"
acl sitios_deny_nacional dstdomain -i
"/etc/squid3/datos/sitios_deny_nacional"
acl sitios_sociales dstdomain -i "/etc/squid3/datos/sitios_sociales"

acl salud url_regex dstdomain -i "/etc/squid3/datos/salud"
acl sitios_internos dst 192.168.2.0/24

always_direct allow salud
always_direct allow sitios_internos

http_access allow salud
http_access deny desabilitado
http_access allow penalizados sitios_salud !sitios_deny_nacional
http_access allow usuarios_social sitios_sociales !sitios_deny_social
!penalizados
http_access allow internet !sitios_deny_internet !penalizados
http_access allow nacional sitios_salud !sitios_deny_nacional
http_access deny all

http_reply_access allow all
miss_access allow all

# ---------------------------------------- #
#             OPCIONES DE RED              #
# ---------------------------------------- #

http_port 192.168.0.1:3128 

# esto es para que solo sirva de proxy el server con IP 192.168.0.1

# --------------------------------------- #
#             PROXY DE SALIDA             #
# --------------------------------------- #

cache_peer proxy.sld.cu       parent    3128  0  no-query default

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

# --------------------------------------- #
#        OPCIONES DE MEMORIA CACHE        #
# --------------------------------------- #

cache_mem 1024 MB
maximum_object_size_in_memory 1024 KB
memory_replacement_policy heap GDSF

# ---------------------------------------- #
#        OPCIONES DE CACHE EN DISCO        #
# ---------------------------------------- #

cache_replacement_policy heap LFUDA
cache_dir aufs /var/spool/squid3 2048 16 256
store_dir_select_algorithm round-robin
maximum_object_size 134217728 bytes
minimum_object_size 3 KB
cache_swap_low 99
cache_swap_high 99

# ------------------------------------- #
#          OPCIONES DE CACHE LOG        #
# ------------------------------------- #

logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt

access_log /var/log/squid3/access.log squid
#cache_log /var/log/squid3/cache.log
#cache_store_log /var/log/squid3/store.log
logfile_rotate 0
emulate_httpd_log off

# -------------------------------------------------------- #
#            OPCIONES DE ACTUALIZACON DE LA CACHE          #
# -------------------------------------------------------- #

refresh_pattern -i ^ftp: 600000 100% 700000 override-expire override-lastmod
reload-into-ims ignore-no-cache ignore-private ignore-auth
refresh_pattern -i ^http: 600000 100% 700000 override-expire
override-lastmod reload-into-ims ignore-no-cache ignore-private ignore-auth
refresh_pattern -i ^gopher: 600000 100% 700000 override-expire
override-lastmod reload-into-ims ignore-no-cache ignore-private ignore-auth
refresh_pattern -i . 600000 100% 700000 override-expire override-lastmod
reload-into-ims ignore-no-cache ignore-private ignore-auth

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100

read_ahead_gap 16384 bytes
negative_ttl 0 seconds
positive_dns_ttl 86400 seconds
negative_dns_ttl 1 seconds
range_offset_limit 0 bytes

# ---------------------------------------- #
#             OPCIONES DE HTTP             #
# ---------------------------------------- #

request_header_max_size 500 KB
reply_header_max_size 20480 bytes
request_body_max_size 0 KB
ie_refresh on
vary_ignore_expire on

request_header_access From deny all
request_header_access User-Agent deny all
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
request_header_access Accept-Language deny all

header_replace User-Agent Mozilla/5.0 (X11; U; Linux i686; es-ES;
rv:1.8.1.12)
header_replace Via 127.0.0.1
header_replace X-Forwarded-For 127.0.0.1
header_replace Accept-Language es,en

# ------------------------------------------ #
#           TIEMPO DE DESCONECCION           #
# ------------------------------------------ #

forward_timeout 240 seconds
connect_timeout 60 seconds
peer_connect_timeout 30 seconds
read_timeout 900 seconds
request_timeout 120 seconds
persistent_request_timeout 60 seconds
client_lifetime 7200 seconds
half_closed_clients off
pconn_timeout 60 seconds
shutdown_lifetime 20 seconds

# -------------------------------------------- #
#          PARAMETROS ADMINISTRATIVOS          #
# -------------------------------------------- #

cache_mgr ad...@cardiows.sld.cu
visible_hostname Cardiocentro Pediatrico William Soler

# ------------------------------------------- #
#         OPCIONES DE ICONOS INTERNOS         #
# ------------------------------------------- #

icon_directory /usr/share/squid3/icons

# --------------------------------------------------- #
#            OPCIONES DE ERRORES DE PAGINAS           #
# --------------------------------------------------- #

error_directory /usr/share/squid3/errors/Spanish

# ------------------------------- #
#          OTRAS OPCIONES         #
# ------------------------------- #

nonhierarchical_direct off
prefer_direct off

# ---------------------------------- #
#          OPCIONES DEL DNS          #
# ---------------------------------- #

dns_nameservers 192.168.0.2

ipcache_size 4096
ipcache_low 98
ipcache_high 99

fqdncache_size 2096

# ----------------------------- #
#           MISCELANIA          #
# ----------------------------- #

memory_pools on
forwarded_for off
offline_mode off
pipeline_prefetch on



______________________________________________________________________
Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba.
Gutl-l@jovenclub.cu
https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l



-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

______________________________________________________________________
Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba.
Gutl-l@jovenclub.cu
https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l

Responder a