저는 오징어 프록시가 https와 작동하도록 하려고 머리를 쥐어짜고 있었습니다. SSL 범핑을 지원하고 활성화되어 있는지 확인했습니다. 나는 또한에 따라 인증서 등을 설정했습니다.https://support.kaspersky.com/KWTS/6.1/en-US/166244.htm하지만 여전히 작동하지 않습니다.
다음이 있으면 작동합니다: acl blacklist_ssl ssl::server_name "/etc/squid/blacklist.acl" http_access denial blacklist_ssl
그러나 내 url_regex가 작동하지 않는다는 사실은 ssl-bump에 여전히 문제가 있음을 나타냅니다.
내 구성 옵션은 ('--with-openssl' '--enable-ssl-crtd')입니다.
Squid Cache: Version 5.2
Service Name: squid
Ubuntu linux
This binary uses OpenSSL 1.1.1f 31 Mar 2020. For legal restrictions on distribution see https://www.openssl.org/source/license.html
configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'BUILDCXXFLAGS=-g -O2 -fdebug-prefix-map=/home/builder/ubuntu20/build/squid/squid-5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now ' 'BUILDCXX=g++' '--with-build-environment=default' '--enable-build-info=Ubuntu linux' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--libexecdir=/usr/lib/squid' '--mandir=/usr/share/man' '--enable-inline' '--disable-arch-native' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth-basic=DB,fake,getpwnam,LDAP,NCSA,PAM,POP3,RADIUS,SASL,SMB' '--enable-auth-digest=file,LDAP' '--enable-auth-negotiate=kerberos,wrapper' '--enable-auth-ntlm=fake,SMB_LM' '--enable-external-acl-helpers=file_userip,kerberos_ldap_group,LDAP_group,session,SQL_session,time_quota,unix_group,wbinfo_group' '--enable-security-cert-validators=fake' '--enable-storeid-rewrite-helpers=file' '--enable-url-rewrite-helpers=fake' '--enable-eui' '--enable-esi' '--enable-icmp' '--enable-zph-qos' '--enable-ecap' '--disable-translation' '--with-swapdir=/var/spool/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/run/squid.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' '--with-systemd' '--with-openssl' '--enable-ssl-crtd' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/home/builder/ubuntu20/build/squid/squid-5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now ' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/home/builder/ubuntu20/build/squid/squid-5.2=. -fstack-protector-strong -Wformat -Werror=format-security'
내 squid.conf는 간단한 URL을 기대하고 있습니다.https://bitbucket.org/금지:
acl intermediate_fetching transaction_initiator certificate-fetching
http_access allow intermediate_fetching
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
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/*.conf
http_access allow localhost
acl test url_regex -i ^https://bitbucket.org/*
http_access deny test
http_access allow all
acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump peek all
ssl_bump splice all
ssl_bump bump all
http_port 3128 ssl-bump tcpkeepalive=60,30,3 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=20MB tls-cert=/etc/squid/bump.crt tls-key=/etc/squid/bump.key cipher=HIGH:MEDIUM:!LOW:!RC4:!SEED:!IDEA:!3DES:!MD5:!EXP:!PSK:!DSS tls-dh=prime256v1:/etc/squid/bump_dhparam.pem
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 . 0 20% 4320
sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 20MB
sslproxy_cert_error deny all
ssl_bump stare all
그런 다음 내 로그에 다음이 표시됩니다(작동해야 한다고 나와 있나요?).
Apr 03 07:15:42 ip-10-2-0-210 squid[29510]: Accepting SSL bumped HTTP Socket connections at conn13 local=[::]:3128 remote=[::] FD 23 flags=9
저는 Ubuntu 20.04와 Squid 버전 5.2를 실행하고 있습니다. 여기서 무엇이 잘못되었는지 알 수 있는 사람이 있습니까?
고쳐 쓰다
좋습니다. 이제 다음을 통해 이 작업을 수행할 수 있습니다.
ssl_bump bump ssl_force_bump
ssl_bump bump all
그러나 여전히 원하는 동작을 얻지 못합니다. 만약 내가 가지고 있다면:
acl whitelist url_regex ^http(s)://bitbucket.org/products
acl blacklist url_regex ^http(s)://bitbucket.org/*
http_access allow whitelist
http_access deny !whitelist blacklist
이제 모든 것이 블랙리스트에 등록되었습니다.https://bitbucket.org
URL의 하위 집합만 블랙리스트에 추가하려면 어떻게 해야 하나요?https://bitbucket.org