rhmoura
(usa Ubuntu)
Enviado em 12/08/2009 - 11:55h
Bom dia pessoal,
configurei o Squid 3 no Fedora 11 seguindo um artigo aqui do VOL.
Porém os computadores na rede não navegam se não for colocado o endereço do proxy no navegador. Alguém sabe o que pode ser?
Segue as confs do Squid:
########################################
http_port 3128 transparent
dns_nameservers 200.175.5.139 200.175.89.139
cache_mem 160 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 5000 16 256
maximum_object_size 30000 KB
maximum_object_size_in_memory 40 KB
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/log/squid/squid.pid
mime_table /etc/squid/mime.conf
cache_mgr teste@teste.com.br
memory_pools off
diskd_program /usr/lib/squid/diskd
unlinkd_program /usr/lib/squid/unlinkd
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl wireless src 192.168.1.0/24
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 1863 # 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
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow wireless
url_rewrite_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf
cache_mgr webmaster
mail_program mail
cache_effective_user squid
cache_effective_group squid
httpd_suppress_version_string off
visible_hostname proxy.teste.com.br
#############################################################
Estas são as regras do Firewall (coloquei ela pra rodar em rc.local):
######################################################
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# Limite contra ping da morte e DoS
iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-reply -m limit --limit 1/s -j DROP
# Liberando portas SSH a partir de qualquer interna somente
iptables -A INPUT -p tcp --dport 22 -i eth0 -j ACCEPT
# Liberando portas squid, http e NTP.
iptables -A INPUT -p tcp --dport 3128 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 123 -i eth0 -j ACCEPT
iptables -A INPUT -p udp --dport 123 -i eth0 -j ACCEPT
# NAT Rede 1. Note que a "eth1" é minha interface diretamente conectada à internet,
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -o eth1 -j MASQUERADE
# Jogando tráfego da porta 80 para o SQUID TRANSPARENT
iptables -t nat -A PREROUTING -s 192.168.1.0/255.255.255.0 -p tcp --dport 80 -j REDIRECT --to-port 3128
############################################################