<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="divRplyFwdMsg" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
here is the default config</div>
<div id="divRplyFwdMsg" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="divRplyFwdMsg" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
#
<div># Recommended minimum configuration:</div>
<div>#</div>
<div><br>
</div>
<div># Example rule allowing access from your local networks.</div>
<div># Adapt to list your (internal) IP networks from where browsing</div>
<div># should be allowed</div>
<div>acl localnet src 0.0.0.1-0.255.255.255  # RFC 1122 "this" network (LAN)</div>
<div>acl localnet src 10.0.0.0/8             # RFC 1918 local private network (LAN)</div>
<div>acl localnet src 100.64.0.0/10          # RFC 6598 shared address space (CGN)</div>
<div>acl localnet src 169.254.0.0/16         # RFC 3927 link-local (directly plugged) machines</div>
<div>acl localnet src 172.16.0.0/12          # RFC 1918 local private network (LAN)</div>
<div>acl localnet src 192.168.0.0/16         # RFC 1918 local private network (LAN)</div>
<div>acl localnet src fc00::/7               # RFC 4193 local private network range</div>
<div>acl localnet src fe80::/10              # RFC 4291 link-local (directly plugged) machines</div>
<div><br>
</div>
<div>acl SSL_ports port 443</div>
<div>acl Safe_ports port 80          # http</div>
<div>acl Safe_ports port 21          # ftp</div>
<div>acl Safe_ports port 443         # https</div>
<div>acl Safe_ports port 70          # gopher</div>
<div>acl Safe_ports port 210         # wais</div>
<div>acl Safe_ports port 1025-65535  # unregistered ports</div>
<div>acl Safe_ports port 280         # http-mgmt</div>
<div>acl Safe_ports port 488         # gss-http</div>
<div>acl Safe_ports port 591         # filemaker</div>
<div>acl Safe_ports port 777         # multiling http</div>
<div>acl CONNECT method CONNECT</div>
<div><br>
</div>
<div>#</div>
<div># Recommended minimum Access Permission configuration:</div>
<div>#</div>
<div># Deny requests to certain unsafe ports</div>
<div>http_access deny !Safe_ports</div>
<div><br>
</div>
<div># Deny CONNECT to other than secure SSL ports</div>
<div>http_access deny CONNECT !SSL_ports</div>
<div><br>
</div>
<div># Only allow cachemgr access from localhost</div>
<div>http_access allow localhost manager</div>
<div>http_access deny manager</div>
<div><br>
</div>
<div># We strongly recommend the following be uncommented to protect innocent</div>
<div># web applications running on the proxy server who think the only</div>
<div># one who can access services on "localhost" is a local user</div>
<div>#http_access deny to_localhost</div>
<div><br>
</div>
<div>#</div>
<div># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS</div>
<div>#</div>
<div><br>
</div>
<div># Example rule allowing access from your local networks.</div>
<div># Adapt localnet in the ACL section to list your (internal) IP networks</div>
<div># from where browsing should be allowed</div>
<div>http_access allow localnet</div>
<div>http_access allow localhost</div>
<div><br>
</div>
<div># And finally deny all other access to this proxy</div>
<div>http_access deny all</div>
<div><br>
</div>
<div># Squid normally listens to port 3128</div>
<div>http_port 3128</div>
<div><br>
</div>
<div># Uncomment and adjust the following to add a disk cache directory.</div>
<div>#cache_dir ufs /var/cache/squid 100 16 256</div>
<div><br>
</div>
<div># Leave coredumps in the first cache dir</div>
<div>coredump_dir /var/cache/squid</div>
<div><br>
</div>
<div>#</div>
<div># Add any of your own refresh_pattern entries above these.</div>
<div>#</div>
<div>refresh_pattern ^ftp:           1440    20%     10080</div>
<div>refresh_pattern ^gopher:        1440    0%      1440</div>
<div>refresh_pattern -i (/cgi-bin/|\?) 0     0%      0</div>
refresh_pattern .               0       20%     4320<br>
</div>
<div dir="ltr">
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I tried using the default config. No difference</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
2022/03/03 21:49:17 kid1| Set Current Directory to /var/cache/squid
<div>2022/03/03 21:49:17 kid1| Starting Squid Cache version 4.17 for x86_64-pc-linux-gnu...</div>
<div>2022/03/03 21:49:17 kid1| Service Name: squid</div>
<div>2022/03/03 21:49:17 kid1| Process ID 382776</div>
<div>2022/03/03 21:49:17 kid1| Process Roles: worker</div>
<div>2022/03/03 21:49:17 kid1| With 1024 file descriptors available</div>
<div>2022/03/03 21:49:17 kid1| Initializing IP Cache...</div>
<div>2022/03/03 21:49:17 kid1| DNS Socket created at [::], FD 5</div>
<div>2022/03/03 21:49:17 kid1| DNS Socket created at 0.0.0.0, FD 8</div>
<div>2022/03/03 21:49:17 kid1| Adding nameserver 8.8.8.8 from /etc/resolv.conf</div>
<div>2022/03/03 21:49:17 kid1| Logfile: opening log daemon:/var/log/access.log</div>
<div>2022/03/03 21:49:17 kid1| Logfile Daemon: opening log /var/log/access.log</div>
<div>2022/03/03 21:49:17 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec</div>
<div>2022/03/03 21:49:17 kid1| Store logging disabled</div>
<div>2022/03/03 21:49:17 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects</div>
<div>2022/03/03 21:49:17 kid1| Target number of buckets: 1008</div>
<div>2022/03/03 21:49:17 kid1| Using 8192 Store buckets</div>
<div>2022/03/03 21:49:17 kid1| Max Mem  size: 262144 KB</div>
<div>2022/03/03 21:49:17 kid1| Max Swap size: 0 KB</div>
<div>2022/03/03 21:49:17 kid1| Using Least Load store dir selection</div>
<div>2022/03/03 21:49:17 kid1| Set Current Directory to /var/cache/squid</div>
<div>2022/03/03 21:49:17 kid1| Finished loading MIME types and icons.</div>
2022/03/03 21:49:17 kid1| HTCP Disabled.<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
netstat -tunpal shows</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt"> netstat -tunpal | grep squid</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div>udp        0      0 0.0.0.0:21638           0.0.0.0:*                           382776/(squid-1)</div>
<div>udp6       0      0 ::1:40383               ::1:50900               ESTABLISHED 382776/(squid-1)</div>
<div>udp6       0      0 ::1:50900               ::1:40383               ESTABLISHED 382776/(squid-1)</div>
udp6       0      0 :::15633                :::*                                382776/(squid-1)<br>
</div>
<div id="x_divRplyFwdMsg" dir="ltr">
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On 3/03/22 14:48, ben wrote:<br>
> Hi,Alex,<br>
> <br>
> <br>
> Thanks for your help. I run squid with the option d1 and its output is <br>
> as followings<br>
> 2022/03/03 09:17:39 kid1| Current Directory is /root<br>
> 2022/03/03 09:17:39 kid1| Starting Squid Cache version 4.17 for <br>
> x86_64-pc-linux-gnu...<br>
> 2022/03/03 09:17:39 kid1| Service Name: squid<br>
> 2022/03/03 09:17:39 kid1| Process ID 239617<br>
> 2022/03/03 09:17:39 kid1| Process Roles: worker<br>
> 2022/03/03 09:17:39 kid1| With 1024 file descriptors available<br>
> 2022/03/03 09:17:39 kid1| Initializing IP Cache...<br>
> 2022/03/03 09:17:39 kid1| DNS Socket created at [::], FD 5<br>
> 2022/03/03 09:17:39 kid1| DNS Socket created at 0.0.0.0, FD 8<br>
> 2022/03/03 09:17:39 kid1| Adding nameserver 8.8.8.8 from /etc/resolv.conf<br>
> 2022/03/03 09:17:39 kid1| Logfile: opening log <br>
> daemon:/var/log/squid/access.log<br>
> 2022/03/03 09:17:39 kid1| Logfile Daemon: opening log <br>
> /var/log/squid/access.log<br>
> 2022/03/03 09:17:39 kid1| Local cache digest enabled; rebuild/rewrite <br>
> every 3600/3600 sec<br>
> 2022/03/03 09:17:39 kid1| Store logging disabled<br>
> 2022/03/03 09:17:39 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 <br>
> objects<br>
> 2022/03/03 09:17:39 kid1| Target number of buckets: 1008<br>
> 2022/03/03 09:17:39 kid1| Using 8192 Store buckets<br>
> 2022/03/03 09:17:39 kid1| Max Mem  size: 262144 KB<br>
> 2022/03/03 09:17:39 kid1| Max Swap size: 0 KB<br>
> 2022/03/03 09:17:39 kid1| Using Least Load store dir selection<br>
> 2022/03/03 09:17:39 kid1| Current Directory is /root<br>
> 2022/03/03 09:17:39 kid1| Finished loading MIME types and icons.<br>
> 2022/03/03 09:17:39 kid1| HTCP Disabled.<br>
> <br>
> the only line in squid.conf is http_port 3128<br>
<br>
<br>
That itself could be the problem.<br>
<br>
Please at least use the default config file shown in <br>
<<a href="https://wiki.squid-cache.org/Squid-4">https://wiki.squid-cache.org/Squid-4</a>>, or better use the squid.conf
<br>
file built with your custom binary.<br>
<br>
<br>
<br>
Cheers<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
squid-users@lists.squid-cache.org<br>
<a href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</div>
</span></font></div>
</div>
</body>
</html>