修正する

修正する

私はイカプロキシが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

ベストアンサー1

おすすめ記事