Score:0

Squid proxy's specific ports don't work for a short preiod of time, then start working again

gd flag

I am using Squid version 4.6 on a Raspberry Pi 4 which has 7 Huawei Wifi Modems connected to it through a hub. After successfully setting up squid to work with all 7 ports and redirect traffic to the modems, everything worked well and I could connect to it from every single port. However, as time went on, some ports/connections just casually stop working for a few minutes or even entire hours and then get back up again. I am almost certain that there are no problems with the modems themselves. When I check the access log, that's what I see for the connections that did not work (the connection :

91.228.155.195 - testuser [09/Nov/2021:17:51:32 +0200] "HEAD http://pcode.info/ HTTP/1.1" 503 368 TCP_MISS:HIER_DIRECT

The HTTP error is 503, and I don't have a single clue why it happens. Here are a couple more messages that I receive for the unsuccessful connections:

89.208.5.14 - - [09/Nov/2021:17:55:13 +0200] "CONNECT www.google.com:443 HTTP/1.1" 407 4061 TCP_DENIED:HIER_NONE 91.228.155.195 - testuser [09/Nov/2021:17:51:25 +0200] "HEAD http://pcode.info/ HTTP/1.1" 0 0 TCP_MISS_ABORTED:HIER_DIRECT

Here's my configuration for squid:

acl port1 myport 20001
acl port2 myport 20002
acl port3 myport 20003
acl port4 myport 20004
acl port5 myport 20005
acl port6 myport 20006
acl port7 myport 20007
#acl manager proto cache_object
#acl localhost src 127.0.0.1/32
#acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
#acl localnet src 192.168.0.0/24
#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

auth_param basic program /usr/lib/squid/basic_db_auth --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 hour
auth_param basic casesensitive off
external_acl_type acl_helper %MYPORT %LOGIN /usr/bin/php /home/pi/external_acl.php
acl user external acl_helper
http_access allow user
#acl user1 proxy_auth user1
#acl user2 proxy_auth user2
#http_access allow user1 port1
#http_access allow user2 port2
http_port 20001
http_port 20002
http_port 20003
http_port 20004
http_port 20005
http_port 20006
http_port 20007

dns_v4_first on

tcp_outgoing_address 192.168.9.114 port1
tcp_outgoing_address 192.168.10.116 port2
tcp_outgoing_address 192.168.11.118 port3
tcp_outgoing_address 192.168.12.120 port4
tcp_outgoing_address 192.168.13.122 port5
tcp_outgoing_address 192.168.14.124 port6
tcp_outgoing_address 192.168.15.125 port7

access_log /var/log/squid/access.log common
#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```

Sometimes restarting squid helps, sometimes it doesn't.
Does anyone know why it might happen? Any general ideas or points that could help me solve it?

Thanks in advance!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.