Problemas con proxy squid en un vps, algunas paginas no cargan

  • Autor Autor alex7979
  • Fecha de inicio Fecha de inicio
A

alex7979

Beta
Verificado por Whatsapp
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola a todos y gracias de antemano por su ayuda, el problema es que tengo un vps con centos 6 con un sevidor squid instalado, me habia funcionado muy bien desde hace varios meses pero tiene varios dias que algunas paginas no terminan de cargar o si lo hacen quedan toda desconfigurados como solo texto, las paginas comienzan a cargar incluso muestro el titylo de la pagina en la pestaña de firefox. No soy experto solo me gusta leer los manuales y probar por mi mismo, como estaba un poco desesperado borre el squid del vps y lo volvi a instalar sin modificar nada en la configuracion, solo las reglas de acceso, lo deje http_access allow all para probar, pero sigue el mismo problema, esto es lo que me muestra el log cuando intento entrar a una de las paginas que se queda cargando pero nunca termina de cargar:

1473952658.369 87040 xxx.xxx.xxx.xxx TCP_MISS/200 5537 CONNECT www.google.com:44 3 - DIRECT/216.58.219.100 -
1473952658.370 83690 xxx.xxx.xxx.xxx TCP_MISS/200 26214 CONNECT www.ipoll.com:44 3 - DIRECT/198.232.218.239 -
1473952658.374 88598 xxx.xxx.xxx.xxx TCP_MISS/200 6038 CONNECT www.google.com:44 3 - DIRECT/216.58.219.100 -
1473952658.381 96084 xxx.xxx.xxx.xxx TCP_MISS/200 4298 CONNECT ssl.gstatic.com:4 43 - DIRECT/216.58.219.99 -
1473952658.383 93244 xxx.xxx.xxx.xxx TCP_MISS/200 4298 CONNECT apis.google.com:4 43 - DIRECT/216.58.219.110 -
1473952658.383 88865 xxx.xxx.xxx.xxx TCP_MISS/200 49082 CONNECT www.google.com:4 43 - DIRECT/216.58.219.100 -
1473952658.386 88604 xxx.xxx.xxx.xxx TCP_MISS/200 6118 CONNECT www.google.com:44 3 - DIRECT/216.58.219.100 -
1473952658.387 95008 xxx.xxx.xxx.xxx TCP_MISS/200 4298 CONNECT www.gstatic.com:4 43 - DIRECT/216.58.219.99 -
1473952757.121 4833 xxx.xxx.xxx.xxx TCP_MISS/200 0 CONNECT snippets.cdn.mozilla .net:443 - DIRECT/54.192.82.95 -
1473952769.061 151 xxx.xxx.xxx.xxx TCP_MISS/200 0 CONNECT www.google.com:443 - DIRECT/216.58.219.100 -
1473952826.513 69865 xxx.xxx.xxx.xxx TCP_MISS/200 4421 CONNECT self-repair.mozilla.org:443 - DIRECT/52.43.52.166 -
1473952830.340 19698 xxx.xxx.xxx.xxx TCP_MISS/200 0 CONNECT aus5.mozilla.org:443 - DIRECT/52.89.19.189 -
1473952842.959 59556 xxx.xxx.xxx.xxx TCP_MISS/200 0 CONNECT d3ph8ohza835t6.cloudfront.net:443 - DIRECT/52.85.35.45 -
1473952871.893 63500 xxx.xxx.xxx.xxx TCP_MISS/200 3347 CONNECT incoming.telemetry.mozilla.org:443 - DIRECT/52.89.205.95 -
1473952875.480 121207 xxx.xxx.xxx.xxx TCP_MISS/200 57785 CONNECT safebrowsing.google.com:443 - DIRECT/173.194.212.136 -
1473952891.398 117356 xxx.xxx.xxx.xxx TCP_MISS/200 3938 CONNECT www.google.com:443 - DIRECT/216.58.219.100 -
1473952894.403 118096 xxx.xxx.xxx.xxx TCP_MISS/200 3906 CONNECT www.google.com:443 - DIRECT/216.58.219.100 -
1473952894.410 125640 xxx.xxx.xxx.xxx TCP_MISS/200 91607 CONNECT www.google.com:443 - DIRECT/216.58.219.100 -
1473952895.402 118383 xxx.xxx.xxx.xxx TCP_MISS/200 4546 CONNECT www.google.com:443 - DIRECT/216.58.219.100 -
1473952898.431 118588 xxx.xxx.xxx.xxx TCP_MISS/200 26177 CONNECT www.ipoll.com:443 - DIRECT/198.232.218.239 -
1473952931.813 62492 xxx.xxx.xxx.xxx TCP_MISS/200 3601 CONNECT shavar.services.mozilla.com:443 - DIRECT/54.68.114.20 -
1473952979.413 218956 xxx.xxx.xxx.xxx TCP_MISS/200 3116121 CONNECT safebrowsing-cache.google.com:443 - DIRECT/216.58.219.110 -
1473953668.542 901419 xxx.xxx.xxx.xxx TCP_MISS/200 0 CONNECT normandy.cdn.mozilla.net:443 - DIRECT/54.230.81.74 -



aqui esta la configuracion squid de todas formas por si necesitan verla:


# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
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) machin$

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

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure 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

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# 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

# And finally deny all other access to this proxy
http_access allow all

# Squid normally listens to port 3128
http_port 3128

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
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


#Enter your servers IP here.
acl ip1 myip xxx.xxx.xxx.xxx.
tcp_outgoing_address xxx.xxx.xxx.xxx ip1



las paginas funcionan correctamente sin proxy asi que el problema esta en el squid, gracias a todos, espero alguien me pueda ayudar.

Probe las mismas paginas con tinyproxy y abren sin problemas, asi que el problema esta con squid.
 
[MENTION=147957]alex7979[/MENTION] Disculpa por no poder ayudarte, pero hago UP para ver si alguien lo lee 🙂
 
Hola amigo por lo que veo a simple vista tienes ese proxy medio descuidado o sea no veo que le tengas usuario y contrasena ni tampoco una ACL donde permites solo se pueda navegar desde tu IP privada de la casa osea la que te asigne tu proveedor pero en caso que la IP cambie es mejor ponerle autenticacion por user y passw.. ahora volviendo al tema tu problema creo es esta directiva squid : always_direct configuration directive que no la tienes incluida y esta intentando hacer las peticiones al 443 que son HTTPS directo y al no tener esa directiva por eso a veces las carga y a veces no prueba poniendole la acl: always_direct allow all para que tu squid no intente buscar ningun peer y pregunte por cache de los sitios sino que haga la cache el mismo .. espero haberte ayudado y si algo nos comentas saludos:encouragement::encouragement::encouragement::encouragement:
 
Hola [MENTION=46302]iwantvps[/MENTION] muchas gracias por tu comentario, la razon por la que no tengo configurado el squid es porque lo desinstale y lo instale de nuevo dejandolo como proxy publico por unos minutos esto con la finalidad de probar si el problema estaba en mi configuracion anterior o en algun otro parametro de squid, lo bueno es que despues lo volvi a borrar actualice el centos y al reinstalar y colocar la misma configuracion que tenia al empezar a fallar, me funciono todo correctamente, ya navego bien como lo hacia antes sin problemas aparentes, lo malo, es que no se lo que estaba fallando :S Mi intencion es configurar este proxy como un proxy anonimo de elite que oculte mi ip real y que no se detecte como un proxy.

Te agradezco cualquier comentario que me puedas dar en este sentido para mejorar o corregir mi configuracion, y ya sabiendo el uso que le doy al proxy crees que sea conveniente incluir la directiva que mencionas???

aqui esta la conf de squid que uso, gracias por tu ayuda.



#A Port you would like to use
http_port 3128

acl manager proto cache_object
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 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 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

http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
hierarchy_stoplist cgi-bin ?
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

#If you are on a 32 bit machine, remove the 64 from /lib64/
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_access
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl ncsaauth proxy_auth REQUIRED
http_access allow ncsaauth
forwarded_for off

#Enter your servers IP here.
acl ip1 myip xxx.xxx.xxx.xxx.
tcp_outgoing_address xxx.xxx.xxx.xxx. ip1

request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control deny all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
 
Última edición:
Hola mira si la co figuración que usabas era de un squid 2.x y la versuon que tienes es otra ejenplo 3.x tal ves eso te traiga problemas lo kejor es desinstalar squid habiendo guardado tu configuración luego asegurate que el arfhivo squid.conf se haya eliminado de /etc/squid luego lo instalas por defecto y prueba si todo te anda bie. Pues listo es esa viena configuración que tienes y entonces tendras que adaptar de nuevo todo desde 0 saludos.
 
Atrás
Arriba