大网数据广告活动
服务器运维问答

Squid HTTPS intercept generates certifcate for IP instead of hostname

· 52CE 我爱测

I'm new to Squid, and having trouble getting SSL filtering work. I have a blanket block setup with Squid as Transparent proxy where access it allowed only to github.com. But, squid generates certificates for IP address instead of…

问题原文

原帖链接 · Shan · CC BY-SA 3.0

I'm new to Squid, and having trouble getting SSL filtering work.

I have a blanket block setup with Squid as Transparent proxy where access it allowed only to github.com. But, squid generates certificates for IP address instead of domain name and SSL validation fails.

Squid version: 3.5.25-20170408-r14154

When I use curl (I have imported my self signed SSL to the certificate store)

curl: (51) SSL: certificate subject name (192.30.255.112) does not match target host name 'github.com'

How to configure properly to splice a whitelist and block all other domains. Below is my current configuration

http_port 3128
http_port 3129 intercept
https_port 3130intercept ssl-bump enerate-host-certificates=on dynamic_cert_mem_cache_size=4MB 
cert=/etc/squid/ssl_certs/myca.pem key=/etc/squid/ssl_certs/myca.pem

acl whitelist ssl::server_name .github.com
acl step1 at_step SslBump1

ssl_bump peek step1
ssl_bump splice whitelist
ssl_bump bump all

Thank you

已采纳解答

原帖链接 · Arun Xavier · CC BY-SA 3.0

Use Squid 4.

I had the same issue, and I switched to Squid 4 (Which is still in development).With the same configurations in the question squid 4 will generate certificates with proper hostname.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。