Squid

Forums: 

hola amigos, mas abajo el detalle de squid.conf
---------------------------------------------------------------

[root@proxy squid]# cat squid.conf
#
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl localhost src ::1/128
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl to_localhost dst ::1/128

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl redlocal src 192.168.15.0/24 # RFC1918 possible internal network
acl redlocal src 192.168.10.0/24 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

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 full src "/etc/squid/full.acl"
acl semifull src "/etc/squid/semifull.acl"
acl webpermitidas url_regex -i abc.com.py ultimahora.com hoy.com.py hoy.contents.s3.amazonaws.com skype google teamViewer mail gmail hotmail outlook target liugong login.live portal.ips.gov hacienda.gov bcp.gov
acl drop src "/etc/squid/drop.acl"
acl dominiospremitidos dstdomain "/etc/squid/dominiospremitidos.acl"
acl hora time 12:30-13:30
acl redes_sociales url_regex "/etc/squid/redes_sociales.acl"
acl full2 src 192.168.15.200/32 192.168.15.201/32 192.168.15.203/32 192.168.15.204/32 192.168.15.205/32 192.168.15.206/32 192.168.15.207/32 192.168.15.208/32 192.168.15.19/32

#
# 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

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# 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 localhost
http_access allow localhost

# And finally deny all other access to this proxy
http_access allow hora
http_access allow full
http_access allow all full2 !redes_sociales
http_access allow webpermitidas !drop
http_access allow dominiospremitidos !drop
http_access deny semifull !webpermitidas
http_access deny all drop
http_access deny all redlocal

# Squid normally listens to port 3128
# Designer
access_log /var/log/squid/access.log
cache_mem 32 MB
http_port 3128 intercept
#https_port 3127 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/squid/ssl/myCA.pem

# http_port 8080 transparent

#http_port 3128

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
logfile_rotate 7
err_html_text cwrodriguez@designer.com.py
# 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 . 0 20% 4320
#shutdown_lifetime 5 seconds
cache_effective_user squid
cache_effective_group squid

----------------------------------------------------------------------------------------------------

el problema esta que en el archivo full.acl o full2.acl agrego la ip que quiero que libere y no pasa nada... alguien que pueda guiarme?

saludos
gracias

Algunas observaciones:

Imagen de deathUser

Algunas observaciones:

Tienes la regla:
http_access allow localhost
dos veces.

Tienes las reglas:

http_access allow webpermitidas !drop
http_access allow dominiospremitidos !drop
http_access deny all drop

Sin embargo no tienes un ACL drop ...

La regla:
http_access allow all full2 !redes_sociales

da acceso a todos "all" los hosts, a cualquier dirección excepto las definidas en el acl redes_sociales, ahí el ACL full2 no hace nada, ya que "all" incluye cualquier dirección.

algo similar para las reglas de deny:

http_access deny all drop
http_access deny all redlocal

Esas dos reglas las reemplazaría por una sola:
http_access deny all

Al inicio de tus reglas tienes:


http_access allow localhost
http_access allow localhost
http_access allow hora

Las reglas de SQUID se aplican como una pila, es decir, según van apareciendo, en este caso la regla "http_access allow hora" hará que cualquier host que se conecte entre 12:30-13:30 tenga acceso sin restricciones, eso está bien si es lo que deseas ...

Bueno, sería de conocer que es lo que quieres hacer para seguir haciendo sugerencias, pero con lo que te he comentado y el tema de que las reglas se aplican en una pila, ya tienes suficiente para depurar tu configuración...

ahhh y revisa que dicen los logs...

bye
;)

primero lo primero

Deberias empezar por diferenciar la acl redlocal ya que esta duplicada pero con diferente segmento de red.
o comenta una o eliminala.

#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl redlocal src 192.168.15.0/24 # RFC1918 possible internal network
acl redlocal src 192.168.10.0/24 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range