stefaniobrunhara
(usa CentOS)
Enviado em 15/06/2013 - 19:51h
Meu servidor centos 6.3 não esta abrindo alguns sites, terra.com.br,
www.google.com.br, etc...
Pesquisei na internet achei vários links, dizendo ser dns, cache, hardware, mas nada deu certo.
Ele abre o site do ig, bradesco, e vários outros, porém existe vários outros sites que ele da o erro tcp_miss/000.
Se retiro as estações do proxy, navega sem problema, então o dns, firewall, placa de rede, estão funcionando, apaguei o cache, troquei de computador, troquei a mídia do centos 6.3, para o centos live cd, instalei o rpm do squid do centos 6.2
Cheguei a fazer um firewall liberando a rede toda para tirar quaisquer outras duvidas, troquei dns e nada, sempre veja esta mensagem no log do squid
Log do erro
1371231954.993 2499 192.168.0.58 TCP_MISS/000 0 GET
http://www.uol.com.br/ - DIRECT/www.uol.com.br -
1371231957.493 2500 192.168.0.58 TCP_MISS/000 0 GET
http://www.uol.com.br/ - DIRECT/www.uol.com.br -
1371231959.993 2498 192.168.0.58 TCP_MISS/000 0 GET
http://www.uol.com.br/ - DIRECT/www.uol.com.br -
Fiz um squid.conf bem simples e um firewall mesmo assim não achei o problema
firewall simples para testes
#!/bin/bash
iptables -F
iptables -X
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
echo 0 > /proc/sys/net/ipv4/conf/all/log_martians
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
modprobe iptable_nat
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_tables
iptables -t nat -A PREROUTING -p tcp -d 2x.xx.1x0.1x0 --dport 80 -j REDIRECT --to-ports 3128
iptables -A FORWARD -t filter -j ACCEPT
iptables -A FORWARD -t filter -j ACCEPT -m state --state ESTABLISHED,RELATED
iptables -A FORWARD -s 0/0 -d 0/0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 0/0 -d 0/0 -o eth+ -j MASQUERADE
## Squid.conf simples para testes
http_port 192.168.0.254:3128 transparent
#dns_nameservers 8.8.8.8
cache_mgr suporte@xxxxxxx.com.br
visible_hostname 192.168.0.254
cache_mem 32 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
ipcache_size 4096
cache_dir ufs /var/spool/squid 50 16 50
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
coredump_dir /var/spool/squid
shutdown_lifetime 5 seconds
cache_effective_user squid
cache_effective_group 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
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 localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
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 pal-nao url_regex -i "/etc/squid/pal-nao"
http_access deny pal-nao
http_access deny !Safe_ports
http_access deny pal-nao
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow all
#http_access deny all