互联网不通过鱿鱼启动

互联网不通过鱿鱼启动

我安装了鱿鱼6.2。我使用 ssl 从源代码构建它。服务正常启动。有2块网卡。一个查看本地网络,另一个查看互联网。我使用的是来自互联网的配置手册来配置配置文件。执行 sudo squid -k reconfigure 和 sudo squid -k 命令后,输出如下

  2024/04/09 22:08:41| Processing Configuration File: /etc/squid/squid.conf (depth 0)
2024/04/09 22:08:41| Processing: acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
2024/04/09 22:08:41| Processing: acl localnet src 10.0.0.0/8            # RFC 1918 local private network (LAN)
2024/04/09 22:08:41| Processing: acl localnet src 100.64.0.0/10         # RFC 6598 shared address space (CGN)
2024/04/09 22:08:41| Processing: acl localnet src 169.254.0.0/16        # RFC 3927 link-local (directly plugged) machines
2024/04/09 22:08:41| Processing: acl localnet src 172.16.0.0/12         # RFC 1918 local private network (LAN)
2024/04/09 22:08:41| Processing: acl localnet src 192.168.0.0/24               # RFC 1918 local private network (LAN)
2024/04/09 22:08:41| Processing: acl localnet src fc00::/7              # RFC 4193 local private network range
2024/04/09 22:08:41| Processing: acl localnet src fe80::/10             # RFC 4291 link-local (directly plugged) machines
2024/04/09 22:08:41| Processing: acl SSL_ports port 443
2024/04/09 22:08:41| Processing: acl Safe_ports port 80         # http
2024/04/09 22:08:41| Processing: acl Safe_ports port 21         # ftp
2024/04/09 22:08:41| Processing: acl Safe_ports port 443                # https
2024/04/09 22:08:41| Processing: acl Safe_ports port 70         # gopher
2024/04/09 22:08:41| Processing: acl Safe_ports port 210                # wais
2024/04/09 22:08:41| Processing: acl Safe_ports port 1025-65535 # unregistered ports
2024/04/09 22:08:41| Processing: acl Safe_ports port 280                # http-mgmt
2024/04/09 22:08:41| Processing: acl Safe_ports port 488                # gss-http
2024/04/09 22:08:41| Processing: acl Safe_ports port 591                # filemaker
2024/04/09 22:08:41| Processing: acl Safe_ports port 777                # multiling http
2024/04/09 22:08:41| Processing: http_access deny !Safe_ports
2024/04/09 22:08:41| Processing: http_access deny CONNECT !SSL_ports
2024/04/09 22:08:41| Processing: http_access allow localhost manager
2024/04/09 22:08:41| Processing: http_access deny manager
2024/04/09 22:08:41| Processing: include /etc/squid/conf.d/*.conf
2024/04/09 22:08:41| Processing Configuration File: /etc/squid/conf.d/debian.conf (depth 1)
2024/04/09 22:08:41| Processing: logfile_rotate 0
2024/04/09 22:08:41| Processing: http_access allow localhost
2024/04/09 22:08:41| Processing: http_access allow localnet
2024/04/09 22:08:41| Processing: http_access allow all
2024/04/09 22:08:41| Processing: http_port 3130
2024/04/09 22:08:41| Processing: https_port 192.168.0.110:3129 intercept ssl-bump cert=/etc/squid/squidCA.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
2024/04/09 22:08:41| Starting Authentication on port 192.168.0.110:3129
2024/04/09 22:08:41| Disabling Authentication on port 192.168.0.110:3129 (interception enabled)
2024/04/09 22:08:41| Processing: http_port 192.168.0.110:3128 intercept
2024/04/09 22:08:41| Starting Authentication on port 192.168.0.110:3128
2024/04/09 22:08:41| Disabling Authentication on port 192.168.0.110:3128 (interception enabled)
2024/04/09 22:08:41| Processing: sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 4MB
2024/04/09 22:08:41| Processing: acl step1 at_step SslBump1
2024/04/09 22:08:41| Processing: ssl_bump peek step1
2024/04/09 22:08:41| Processing: ssl_bump bump all
2024/04/09 22:08:41| Processing: ssl_bump splice all
2024/04/09 22:08:41| Processing: coredump_dir /var/spool/squid
2024/04/09 22:08:41| Processing: refresh_pattern ^ftp:          1440    20%    10080
2024/04/09 22:08:41| Processing: refresh_pattern ^gopher:       1440    0%     1440
2024/04/09 22:08:41| Processing: refresh_pattern -i (/cgi-bin/|\?) 0    0%     0
2024/04/09 22:08:41| Processing: refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
2024/04/09 22:08:41| Processing: refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
2024/04/09 22:08:41| Processing: refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
2024/04/09 22:08:41| Processing: refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
2024/04/09 22:08:41| Processing: refresh_pattern .              0       20%    4320
2024/04/09 22:08:41| Requiring client certificates.
2024/04/09 22:08:41| Loaded signing certificate: /C=RU/ST=Moscow/L=Moscow/O=Internet Widgits Pty Ltd
2024/04/09 22:08:41| Not requiring any client certificates

命令 sudo squid -k 重新配置

2024/04/09 22:09:41| Processing Configuration File: /etc/squid/squid.conf (depth 0)
2024/04/09 22:09:41| Processing Configuration File: /etc/squid/conf.d/debian.conf (depth 1)
2024/04/09 22:09:41| Starting Authentication on port 192.168.0.110:3129
2024/04/09 22:09:41| Disabling Authentication on port 192.168.0.110:3129 (interception enabled)
2024/04/09 22:09:41| Starting Authentication on port 192.168.0.110:3128
2024/04/09 22:09:41| Disabling Authentication on port 192.168.0.110:3128 (interception enabled)
2024/04/09 22:09:41| ERROR: cannot change current directory to /var/spool/squid: (2) No such file or directory
2024/04/09 22:09:41| Current Directory is /home/nicolay
2024/04/09 22:09:41| FATAL: failed to open /var/run/squid.pid: (2) No such file or directory
    exception location: File.cc(191) open

所有证书均已生成。路径拼写正确。通过 https 的 Internet 无法在客户端计算机上运行。 ping 正在通过。 iptables 在 PREROUTING 和 INPUT 中具有从 443 到 3129 和 80 到 3128 的端口转发规则。squid.config

acl localnet src 0.0.0.1-0.255.255.255  # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8             # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10          # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16         # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12          # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/24         # RFC 1918 local private network (LAN)
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

http_port 3130
https_port 192.168.0.110:3129 intercept ssl-bump cert=/etc/squid/squidCA.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
http_port 192.168.0.110:3128 intercept

sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 4MB

acl step1 at_step SslBump1

ssl_bump peek step1
ssl_bump bump all

ssl_bump splice all

请帮助。我是 Linux 新手。无法读取 Squida 日志和缓存。互联网上的所有信息都不同,但没有任何帮助。清除缓存或手动创建 pi 文件等操作没有帮助。当我安装鱿鱼 5.7 时,我设法从存储库获取互联网,但通过 http 协议。配置是一样的。必须安装squid 6.2,因为squid 5.7 不想在我的机器上编译。我认为这与源代码有关。该机器位于 ubuntu 服务器 22.04 上。我在虚拟机上使用它。

答案1

我帮助做出了以下决定。我已经成功通过命令安装了鱿鱼

sudo apt install squid-openssl

在我更新存储库之前。它是安装了squid 5.7的包,没有从源头组装。配置squid 5.7已成功完成。也许,来源很糟糕。我不知道,有带SSL的squid 5.7的deb包。我非常感谢斯蒂芬·基特的成功。

相关内容