Поднял squid по статье https://habr.com/post/354708/ и не работает https. Сборку и настройки делаю на debian 9.6 x64 Сквид запустился.
squid -v
Squid Cache: Version 3.5.27
Service Name: squid
Debian linux
This binary uses OpenSSL 1.0.2l 25 May 2017. 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' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' 'BUILDCXXFLAGS=-g -O2 -fdebug-prefix-map=/root/SQUIDNEW/squid3-3.5.27-2018=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed' '--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,NIS,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-url-rewrite-helpers=fake' '--enable-eui' '--enable-esi' '--enable-icmp' '--enable-zph-qos' '--enable-ecap' '--enable-ssl' '--enable-ssl-crtd' '--with-openssl' '--disable-translation' '--with-swapdir=/var/spool/squid' '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-build-info=Debian linux' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/root/SQUIDNEW/squid3-3.5.27-2018=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/root/SQUIDNEW/squid3-3.5.27-2018=. -fstack-protector-strong -Wformat -Werror=format-security'
systemctl status squid
● squid.service - LSB: Squid HTTP Proxy version 3.x
Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled)
Active: active (running) since Wed 2018-12-05 15:27:22 +07; 14min ago
Docs: man:systemd-sysv-generator(8)
Process: 21303 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)
Process: 21345 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)
Main PID: 21386 (squid)
Tasks: 5 (limit: 4915)
Memory: 22.7M
CPU: 957ms
CGroup: /system.slice/squid.service
├─21384 /usr/sbin/squid -YC -f /etc/squid/squid.conf
├─21386 (squid-1) -YC -f /etc/squid/squid.conf
├─21387 (logfile-daemon) /var/log/squid/access.log
├─21388 (unlinkd)
└─21389 (pinger)
Dec 05 15:27:21 vcgateway systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
Dec 05 15:27:22 vcgateway squid[21384]: Squid Parent: will start 1 kids
Dec 05 15:27:22 vcgateway squid[21384]: Squid Parent: (squid-1) process 21386 started
Dec 05 15:27:22 vcgateway squid[21345]: Starting Squid HTTP Proxy: squid.
Dec 05 15:27:22 vcgateway systemd[1]: squid.service: PID file /var/run/squid.pid not readable (yet?) after start: No such file or directory
Dec 05 15:27:22 vcgateway systemd[1]: squid.service: Supervising process 21386 which is not our child. We'll most likely not notice when it exits.
Dec 05 15:27:22 vcgateway systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.
Конфиг squid получился следующий:
cat /etc/squid/squid.conf
acl localnet src 192.168.8.0/24 # Ваша локалка
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
acl SSL method CONNECT
#Укажем DNS для Squid. Крайне рекомендую использовать одинаковые DNS тут и у клиентов
dns_nameservers 192.168.8.1 #dns поднят на этом же сервере
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
icp_access deny all
htcp_access deny all
#прозрачный порт указывается опцией intercept
http_port 192.168.8.1:3128 intercept options=NO_SSLv3:NO_SSLv2
#также нужно указать непрозрачный порт, ибо если захотите вручную указать адрес
#прокси в браузере, указав прозрачный порт, вы получите ошибку доступа, поэтому нужно
#указывать непрозрачный порт в браузере, если конечно такое желание будет, к тому же в логах #сыпятся ошибки о том, что непрохрачный порт не указан=)
http_port 192.168.8.1:3130 options=NO_SSLv3:NO_SSLv2
#и наконец, указываем HTTPS порт с нужными опциями
https_port 192.168.8.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/etc/squid/squidCA.pem
sslproxy_cert_error allow all
sslproxy_flags DONT_VERIFY_PEER
#укажем правило со списком блокируемых ресурсов (в файле домены вида .domain.com)
acl blocked ssl::server_name "/etc/squid/blocked_https.acl"
acl step1 at_step SslBump1
ssl_bump peek step1
#терминируем соединение, если клиент заходит на запрещенный ресурс
ssl_bump terminate blocked
ssl_bump splice all
sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
cache_dir ufs /var/spool/squid 100 16 256
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
logfile_rotate 4
pid_filename /var/run/squid.pid
squid -k parse
2018/12/05 15:50:47| Startup: Initializing Authentication Schemes ...
2018/12/05 15:50:47| Startup: Initialized Authentication Scheme 'basic'
2018/12/05 15:50:47| Startup: Initialized Authentication Scheme 'digest'
2018/12/05 15:50:47| Startup: Initialized Authentication Scheme 'negotiate'
2018/12/05 15:50:47| Startup: Initialized Authentication Scheme 'ntlm'
2018/12/05 15:50:47| Startup: Initialized Authentication.
2018/12/05 15:50:47| Processing Configuration File: /etc/squid/squid.conf (depth 0)
2018/12/05 15:50:47| Processing: acl localnet src 192.168.8.0/24 # Ваша локалка
2018/12/05 15:50:47| Processing: acl SSL_ports port 443
2018/12/05 15:50:47| Processing: acl Safe_ports port 80 # http
2018/12/05 15:50:47| Processing: acl Safe_ports port 21 # ftp
2018/12/05 15:50:47| Processing: acl Safe_ports port 443 # https
2018/12/05 15:50:47| Processing: acl Safe_ports port 70 # gopher
2018/12/05 15:50:47| Processing: acl Safe_ports port 210 # wais
2018/12/05 15:50:47| Processing: acl Safe_ports port 1025-65535 # unregistered ports
2018/12/05 15:50:47| Processing: acl Safe_ports port 280 # http-mgmt
2018/12/05 15:50:47| Processing: acl Safe_ports port 488 # gss-http
2018/12/05 15:50:47| Processing: acl Safe_ports port 591 # filemaker
2018/12/05 15:50:47| Processing: acl Safe_ports port 777 # multiling http
2018/12/05 15:50:47| Processing: acl CONNECT method CONNECT
2018/12/05 15:50:47| Processing: acl SSL method CONNECT
2018/12/05 15:50:47| Processing: dns_nameservers 192.168.8.1
2018/12/05 15:50:47| Processing: http_access deny !Safe_ports
2018/12/05 15:50:47| Processing: http_access deny CONNECT !SSL_ports
2018/12/05 15:50:47| Processing: http_access allow localhost manager
2018/12/05 15:50:47| Processing: http_access deny manager
2018/12/05 15:50:47| Processing: http_access allow localnet
2018/12/05 15:50:47| Processing: http_access allow localhost
2018/12/05 15:50:47| Processing: http_access deny all
2018/12/05 15:50:47| Processing: icp_access deny all
2018/12/05 15:50:47| Processing: htcp_access deny all
2018/12/05 15:50:47| Processing: http_port 192.168.8.1:3128 intercept options=NO_SSLv3:NO_SSLv2
2018/12/05 15:50:47| Starting Authentication on port 192.168.8.1:3128
2018/12/05 15:50:47| Disabling Authentication on port 192.168.8.1:3128 (interception enabled)
2018/12/05 15:50:47| Processing: http_port 192.168.8.1:3130 options=NO_SSLv3:NO_SSLv2
2018/12/05 15:50:47| Processing: https_port 192.168.8.1:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/etc/squid/squidCA.pem
2018/12/05 15:50:47| Starting Authentication on port 192.168.8.1:3129
2018/12/05 15:50:47| Disabling Authentication on port 192.168.8.1:3129 (interception enabled)
2018/12/05 15:50:47| Processing: sslproxy_cert_error allow all
2018/12/05 15:50:47| Processing: sslproxy_flags DONT_VERIFY_PEER
2018/12/05 15:50:47| Processing: acl blocked ssl::server_name "/etc/squid/blocked_https.acl"
2018/12/05 15:50:47| Processing: acl step1 at_step SslBump1
2018/12/05 15:50:47| Processing: ssl_bump peek step1
2018/12/05 15:50:47| Processing: ssl_bump terminate blocked
2018/12/05 15:50:47| Processing: ssl_bump splice all
2018/12/05 15:50:47| Processing: sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
2018/12/05 15:50:47| Processing: cache_dir ufs /var/spool/squid 100 16 256
2018/12/05 15:50:47| Processing: coredump_dir /var/spool/squid
2018/12/05 15:50:47| Processing: refresh_pattern ^ftp: 1440 20% 10080
2018/12/05 15:50:47| Processing: refresh_pattern ^gopher: 1440 0% 1440
2018/12/05 15:50:47| Processing: refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
2018/12/05 15:50:47| Processing: refresh_pattern . 0 20% 4320
2018/12/05 15:50:47| Processing: logfile_rotate 4
2018/12/05 15:50:47| Processing: pid_filename /var/run/squid.pid
2018/12/05 15:50:47| Initializing https proxy context
2018/12/05 15:50:47| Initializing https_port 192.168.8.1:3129 SSL context
2018/12/05 15:50:47| Using certificate in /etc/squid/squidCA.pem
cat /etc/iptables.sh
IPTABLES=/sbin/iptables
INT_IP=192.168.8.1
INT_DEV=enp3s0
EXT_IP=XX.XX.XX.XX
EXT_DEV=ppp777
date
echo 0 > /proc/sys/net/ipv4/ip_forward
$IPTABLES -F
$IPTABLES -t filter -A FORWARD -j TCPMSS -p tcp --tcp-flags SYN,RST SYN --clamp-mss-to-pmtu
$IPTABLES -t filter -A INPUT -j ACCEPT -m state --state RELATED,ESTABLISHED
$IPTABLES -t filter -A INPUT -j ACCEPT -s 127.0.0.1 -d 127.0.0.1
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p udp -m multiport --dport 53,67,68
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p tcp -m multiport --dport 53,80,445,5038,5060,3306,3128
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p tcp --dport 22
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p tcp -m multiport --dport 8006
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p icmp
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p igmp
$IPTABLES -t filter -A INPUT -j ACCEPT -i $INT_DEV -p ospf
$IPTABLES -t filter -A INPUT -j REJECT -i $INT_DEV
$IPTABLES -t filter -A FORWARD -j TCPMSS -p tcp --tcp-flags SYN,RST SYN --clamp-mss-to-pmtu
$IPTABLES -t filter -A INPUT -j ACCEPT -m state --state RELATED,ESTABLISHED
$IPTABLES -t filter -A INPUT -j ACCEPT -s 127.0.0.1 -d 127.0.0.1
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p tcp --dport 22
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p tcp -m multiport --dport 10050,8011
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p icmp
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p igmp
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p ospf
$IPTABLES -t filter -A INPUT -j ACCEPT -i $EXT_DEV -p gre
$IPTABLES -t filter -A INPUT -j DROP -i $EXT_DEV
$IPTABLES -t mangle -F
$IPTABLES -t mangle -A FORWARD -j TCPMSS -p tcp --tcp-flags SYN,RST SYN --clamp-mss-to-pmtu
$IPTABLES -t mangle -A OUTPUT -j TOS -o $INT_DEV -p udp --set-tos 0x10
$IPTABLES -t mangle -A INPUT -j TOS -i $INT_DEV -p udp --set-tos 0x10
$IPTABLES -t nat -F
$IPTABLES -t nat -A PREROUTING -p tcp -m tcp -s 192.168.8.0/24 --dport 80 -j REDIRECT --to-ports 3128 #redirect HTTP to proxy
$IPTABLES -t nat -A PREROUTING -p tcp -m tcp -s 192.168.8.0/24 --dport 443 -j REDIRECT --to-ports 3129 #redirect HTTPS to proxy
$IPTABLES -t nat -A POSTROUTING -s 192.168.8.0/24 -j SNAT -o $EXT_DEV --to-source $EXT_IP #internet access
echo 1 > /proc/sys/net/ipv4/ip_forward
С такими настройка http трафик фильтруется и видно в логах сквида, но при открытие сайтов https страница не доступна, в логах сквида никакой инфы не появляется. Подскажите куда копать, уже кучу версий сквида перепробовал и 3.5.X и 4.X и везде одно и тоже http фильтруется, а вот https нет.