烏賊!致命:沒有為 HTTPS_port 設定有效的簽章憑證

烏賊!致命:沒有為 HTTPS_port 設定有效的簽章憑證

我在 Ubuntu 20.04 上使用 Squid 4.13 已經有大約一週的時間了。

我最新的(希望也是最後一個)問題是這樣的:

致命:沒有為 HTTPS_port 設定有效的簽章憑證

這是我的台詞:

https_port 0.0.0.0:3128 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/squid/etc/rootCA.crt key=/usr/local/squid/etc/rootCA.key options=SINGLE_DH_USE,SINGLE_ECDH_USE tls-dh=/usr/local/squid/etc/dhparam.pem

我一直在四處尋找(至少感覺如此),甚至魷魚自己的維基(https://wiki.squid-cache.org/ConfigExamples/Intercept/SslBumpExplicit)是維爾德?因為在開始時他們展示瞭如何處理 .pem 文件,但在文檔末尾展示了示例行,他們談論的是 .crt 和 .key 以及完全不同的 .pem 文件。

我唯一改變的就是將位數提高到 4096

所以,我又迷路了!有人知道他們在說什麼嗎?什麼是正確的格式以及如何做到這一點......啊!幫助?

編輯:這是我正在使用的“標準”配置:

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/16         # 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
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
include /etc/squid/conf.d/*
http_access allow localhost
http_access allow all

include /etc/squid/conf.d/*
https_port 0.0.0.0:3128 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB tls-cert=/usr/local/squid/etc/Root-ca-cert.pem  cert=/usr/local/squid/etc/rootCA.crt key=/usr/local/squid/etc/rootCA.key options=SINGLE_DH_USE,SINGLE_ECDH_USE tls-dh=/usr/local/squid/etc/dhparam.pem

/etc/squid/conf.d 中包含的設定是一個名為 debian.conf 的檔案:

#
# Squid configuration settings for Debian
#

# Logs are managed by logrotate on Debian
logfile_rotate 0

# For extra security Debian packages only allow
# localhost to use the proxy on new installs
#
#http_access allow localnet

按照要求:

Aug  4 12:25:47 socks systemd[1]: Starting Squid Web Proxy Server...
Aug  4 12:25:52 socks squid[9474]: 2021/08/04 12:25:52| FATAL: No valid signing certificate configured for HTTPS_port 0.0.0.0:3128
Aug  4 12:25:52 socks squid: FATAL: No valid signing certificate configured for HTTPS_port 0.0.0.0:3128
Aug  4 12:25:52 socks squid[9474]: 2021/08/04 12:25:52| Squid Cache (Version 4.13): Terminated abnormally.
Aug  4 12:25:52 socks squid[9474]: CPU Usage: 5.132 seconds = 5.128 user + 0.004 sys
Aug  4 12:25:52 socks squid[9474]: Maximum Resident Size: 62224 KB
Aug  4 12:25:52 socks squid[9474]: Page faults with physical i/o: 0
Aug  4 12:25:52 socks systemd[1]: squid.service: Control process exited, code=exited, status=1/FAILURE
Aug  4 12:25:52 socks systemd[1]: squid.service: Failed with result 'exit-code'.
Aug  4 12:25:52 socks systemd[1]: Failed to start Squid Web Proxy Server.

答案1

解決方案的一部分是 ID 10 T 問題,顯然憑證有錯誤,即使您測試說它沒問題,但在建立新憑證後它就起作用了。

後來出現的有關循環的問題在此確定:https://unix.stackexchange.com/questions/664236/squid-proxy-is-eating-up-its-own-resources-and-other-issues

並在此處發布了新的問題佈局:https://unix.stackexchange.com/questions/664669/squid-caught-in-loop-cert-error

相關內容