Tchula
(usa Debian)
Enviado em 02/05/2016 - 10:51h
Bom dia a todos...
Uso a distribuição Debian 8, e nele tenho configurado o proxy com squid3 versão 3.4.8, dai estou tentando configurar um proxy transparente, mas quando faço a configuração o proxy não funciona mais, estou configurando o arquivo rc.local como mostro abaixo.
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3129
exit 0
segue a configuração do squid3
http_port 3128
http_port 3129 intercept
visible_hostname debian
#acl manager proto cache_object
#acl localhost src 127.0.0.1/255.255.255.0
#########INICIO DA CONFIGURAÇÃO DO CACHE##########################
cache_mem 128 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_effective_user squid
cache_effective_group squid
cache_dir ufs /var/spool/squid 2048 16 256
cache_access_log /var/log/squid3/access.log
coredump_dir /var/spool/squid
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
#########FIM DA CONFIGURAÇÃO DO CACHE#############################
#########FIM DA CONFIGURAÇÃO DO CACHE#############################
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 8080 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
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 901 # swat
acl Safe_ports port 63259 # skype
acl Safe_ports port 1025-65535 # portas altas
acl almoco time 12:00-14:30
http_access allow almoco
##########INICIO DA AUTENTICAÇÃO POR USUÁRIO##################
auth_param basic realm Servidor_Proxy (Digite Usuario e Senha)
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/squid_passwd
acl autenticados proxy_auth REQUIRED
#######FIM DA CONFIGURAÇÃO DE AUTENTICAÇÃO####################
########INICIO DE BLOQUEIO DE PAGINAS##########################
#acl liberados proxy_auth "/etc/squid3/liberados"
#http_access allow liberados
acl sitesliberados url_regex -i "/etc/squid3/sitesliberados"
http_access allow sitesliberados
acl intranet url_regex -i "/etc/squid3/intranet"
acl tom proxy_auth tom
acl derivan proxy_auth derivan
acl adriano proxy_auth adriano
http_access allow intranet tom
http_access allow intranet derivan
http_access allow intranet adriano
http_access deny tom all
http_access deny derivan all
http_access deny adriano all
acl listadebloqueios url_regex -i "/etc/squid3/listadebloqueios"
http_access deny listadebloqueios
acl palavras_negadas url_regex -i "/etc/squid3/palavras_negadas"
http_access deny palavras_negadas
reply_body_max_size 10 MB
http_access allow autenticados
#########FIM DA CONFIGURAÇÃO DE AUTENTICAÇÃO####################
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
acl redelocal src 192.168.0.0/24
http_access allow localhost
http_access allow redelocal
http_access deny all