cont4rin
(usa Ubuntu)
Enviado em 12/05/2012 - 08:38h
Configurei o squid.conf como foi indicado, criei os 2 arquivos em /etc/squid, com o ip libera( para testes estou usando a classe 10.1.1.0) Mudei os ips aonde tinha numero de ips.
no arquivo /etc/rc.local eu adicionei a o seguinte comando para redirecionar para a porta 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 3128
E meu arquivo squid.conf ficou assim como abaixo (acima disso só tem comentário e abaixo é o arquivo sem alteração)
a maquina que eu configurei para acessar o proxy não bloqueia nada, apesar de eu só ter adicionado o gmail e google no aquivo libera_restrito.
O que posso estar errando?
########################################################################
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 localnet src 192.168.0.0/16 # RFC1918 possible internal network
#
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# TAG: http_access
# Allowing or Denying access based on defined access lists
#
# Access to the HTTP port:
# http_access allow|deny [!]aclname ...
#
# NOTE on default values:
#
# If there are no "access" lines present, the default is to deny
# the request.
#
# If none of the "access" lines cause a match, the default is the
# opposite of the last line in the list. If the last line was
# deny, the default is allow. Conversely, if the last line
# is allow, the default will be deny. For these reasons, it is a
# good idea to have an "deny all" or "allow all" entry at the end
# of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all
#
#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than 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
#
##########################################################################
# MINHAS REGRAS DE ACESSO ################################################
##########################################################################
#
acl users_liberados src "/etc/squid/ips_liberados"
acl user_restrito src 10.1.1.6
acl liberado_restrito url_regex -i "/etc/squid/libera_restrito"
http_access allow users_liberados
http_access deny user_restrito !liberado_restrito
http_access deny all
# 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 localnet
http_access allow localhost