4

I am trying to setup squid on Google cloud engine but i am getting 503 Service Unavailable with every website.

curl -x http://35.xx.xxx.xxx:62401   -I http://www.squid-cache.org/Support/
HTTP/1.1 503 Service Unavailable
Server: squid
Mime-Version: 1.0
Date: Fri, 01 Feb 2019 13:45:15 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3670
X-Squid-Error: ERR_CONNECT_FAIL 101
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from google_proxyv1
X-Cache-Lookup: MISS from google_proxyv1:62401
Connection: keep-alive

I stripped my squid conf to the minimum below

acl CONNECT method CONNECT
http_access allow CONNECT 
# And finally allow all  access to this proxy
http_access allow all
# Squid port
http_port 0.0.0.0:62401
debug_options ALL,1 5,5
request_header_access User-Agent deny all
request_header_replace Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari
/537.36
tcp_outgoing_address 35.xx.xxx.xxx
cache_access_log /var/log/squid/access.log
httpd_suppress_version_string on
cache_store_log none
shutdown_lifetime 1 second
icp_port 0
htcp_port 0
icp_access deny all
htcp_access deny all
snmp_port 0
snmp_access deny all
memory_pools off
via off
forwarded_for delete
follow_x_forwarded_for deny all
pipeline_prefetch on
request_header_access From deny all
request_header_access Server deny all

squid is listening to ipv4 as i reserved only one ipv4 address

sudo netstat -antp | grep squid

tcp        0      0 0.0.0.0:62401           0.0.0.0:*               LISTEN      16811/(squid-1)   

However access log is showing that is it still trying to connect to ipv6 address

1549028715.317      3 35.xx.xxx.xxx TCP_MISS/503 357 HEAD http://www.squid-cache.org/Support/ - HIER_DIRECT/2001:4800:7812:514:be76:4eff:fe04:5ca1

I already open 62401 tcp on Google cloud engine

2 Answers 2

12
+50

Try disable IPv6

dns_v4_first on
0
2

I had to remove tcp_outgoing_address and also add dns_v4_first on

1
  • 1
    Can you explain why?
    – Zioalex
    Jul 27, 2022 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.