Ubuntu 上的 squid 代理拒绝连接

Ubuntu 上的 squid 代理拒绝连接

我刚刚在我的 Ubuntu 服务器上安装了 squid。但是当我尝试连接时,我收到来自本地计算机的连接拒绝消息(在防火墙中我已为我的本地 IP 添加了许可证)

下面您可以找到 squid 配置和 cachlog。任何支持都将不胜感激。

/etc/squid/squid.conf

acl mylocalip xxx.xxx.xxx.xxx/32

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 mylocalip
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all

http_port 19228

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 (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

/var/log/squid/cache.log

2017/09/16 10:07:07 kid1| Set Current Directory to /var/spool/squid
2017/09/16 10:07:07 kid1| Starting Squid Cache version 3.5.23 for x86_64-pc-linux-gnu...
2017/09/16 10:07:07 kid1| Service Name: squid
2017/09/16 10:07:07 kid1| Process ID 9499
2017/09/16 10:07:07 kid1| Process Roles: worker
2017/09/16 10:07:07 kid1| With 65535 file descriptors available
2017/09/16 10:07:07 kid1| Initializing IP Cache...
2017/09/16 10:07:07 kid1| DNS Socket created at [::], FD 6
2017/09/16 10:07:07 kid1| DNS Socket created at 0.0.0.0, FD 8
2017/09/16 10:07:07 kid1| Adding nameserver 169.254.169.254 from /etc/resolv.conf
2017/09/16 10:07:07 kid1| Adding nameserver 127.0.0.53 from /etc/resolv.conf
2017/09/16 10:07:07 kid1| Adding domain c.bibipcom-174407.internal from /etc/resolv.conf
2017/09/16 10:07:07 kid1| Adding domain google.internal from /etc/resolv.conf
2017/09/16 10:07:07 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2017/09/16 10:07:07 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2017/09/16 10:07:07 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2017/09/16 10:07:07 kid1| Store logging disabled
2017/09/16 10:07:07 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2017/09/16 10:07:07 kid1| Target number of buckets: 1008
2017/09/16 10:07:07 kid1| Using 8192 Store buckets
2017/09/16 10:07:07 kid1| Max Mem  size: 262144 KB
2017/09/16 10:07:07 kid1| Max Swap size: 0 KB
2017/09/16 10:07:07 kid1| Using Least Load store dir selection
2017/09/16 10:07:07 kid1| Set Current Directory to /var/spool/squid
2017/09/16 10:07:07 kid1| Finished loading MIME types and icons.
2017/09/16 10:07:07 kid1| HTCP Disabled.
2017/09/16 10:07:07 kid1| Pinger socket opened on FD 13
2017/09/16 10:07:07 kid1| Squid plugin modules loaded: 0
2017/09/16 10:07:07 kid1| Adaptation support is off.
2017/09/16 10:07:07 kid1| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 11 flags=9
2017/09/16 10:07:07| pinger: Initialising ICMP pinger ...
2017/09/16 10:07:07| pinger: ICMP socket opened.
2017/09/16 10:07:07| pinger: ICMPv6 socket opened
2017/09/16 10:07:08 kid1| storeLateRelease: released 0 objects
2017/09/16 10:18:33 kid1| Preparing for shutdown after 0 requests
2017/09/16 10:18:33 kid1| Waiting 30 seconds for active connections to finish
2017/09/16 10:18:33 kid1| Closing HTTP port [::]:3128
2017/09/16 10:18:33 kid1| Closing Pinger socket on FD 13
2017/09/16 10:18:48| Pinger exiting.
2017/09/16 10:19:04 kid1| Shutdown: NTLM authentication.
2017/09/16 10:19:04 kid1| Shutdown: Negotiate authentication.
2017/09/16 10:19:04 kid1| Shutdown: Digest authentication.
2017/09/16 10:19:04 kid1| Shutdown: Basic authentication.
2017/09/16 10:19:04 kid1| Shutting down...
2017/09/16 10:19:04 kid1| storeDirWriteCleanLogs: Starting...
2017/09/16 10:19:04 kid1|   Finished.  Wrote 0 entries.
2017/09/16 10:19:04 kid1|   Took 0.00 seconds (  0.00 entries/sec).
CPU Usage: 0.064 seconds = 0.060 user + 0.004 sys
Maximum Resident Size: 106000 KB
Page faults with physical i/o: 0
2017/09/16 10:19:04 kid1| Logfile: closing log daemon:/var/log/squid/access.log
2017/09/16 10:19:04 kid1| Logfile Daemon: closing log daemon:/var/log/squid/access.log
2017/09/16 10:19:04 kid1| Open FD UNSTARTED     6 DNS Socket IPv6
2017/09/16 10:19:04 kid1| Open FD UNSTARTED     8 DNS Socket IPv4
2017/09/16 10:19:04 kid1| Open FD UNSTARTED     9 IPC UNIX STREAM Parent
2017/09/16 10:19:04 kid1| Squid Cache (Version 3.5.23): Exiting normally.

答案1

通过以下方式检查 squid 状态后:

sudo service squid status

我注意到 squid 配置行中有一个拼写错误。

相关内容