adircastro
(usa Debian)
Enviado em 17/08/2007 - 12:31h
Olá,
Alguém poderia dar uma olhada nessas minhas configurações e localizar algum erro, que faz com que o proxy não fique transparante? Só navego se indicar no navegador o uso do proxy.
Logo abaixo segue minhas configurações.
Grato a todos.
cyber:/etc/squid# cat /etc/init.d/iptables.conf
#!/bin/bash
#
# /etc/init.d/iptables.conf
# Limpa e inicia os modulos
#
iptables -F
iptables -t nat -F
iptables -t mangle -F
modprobe iptable_nat
#
# Proxy transparante apontando para ethx - rede local
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j REDIRECT --to-port 8080
#
# Compartilhando a internet - ethx - rede externa
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
-------------------------------
cyber:/etc/squid# cat squid.conf
# CONFIGURACOES GERAIS
http_port 8080
cache_mem 64 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 4096 KB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 512 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
error_directory /usr/share/squid/errors/Portuguese
emulate_httpd_log on
visible_hostname cybernet
cache_mgr adir_castro@ig.com.br
#
# ACLS RECOMENDADAS
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # 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 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
#
# ACLS PERSONALIZADAS
# Define a rede interna
acl redelocal src 192.168.0.0/255.255.255.0
#
# DEFINE SITES BLOQUEADOS NA REDE
acl proibidos dstdomain "/etc/squid/proibidos
#
# HTTP_ACCESS RECOMENDADAS
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#
# LIBERACAO DE DOWNLOADAS ATE 5 MB
#reply_body_max_size 524880 allow all
#
#PERMITE ACESSO DA REDE INTERNA
http_access allow redelocal
#
# NEGA TUDO QUE NAO FOI LIBERADO OU NEGADO
http_access deny all
------------------------
cyber:/etc/squid# squid -z
2007/08/17 09:27:46| Squid is already running! Process ID 2569