#StackBounty: #squid #transparent-proxy #ssl-bumping Unable to access HTTP sites through HTTPS Squid proxy

Bounty: 50

I have working configuration for SSL bumping on Squid 4.4 and RHEL8. I’m finding though, that a handful of sites that don’t have SSL set up (e.g., http://squidguard.org) are not working.

I’ve had to cobble together my configuration using several different sources since none seem to offer a definitive approach to setting up SSL bumping. It’s possible that I’ve missed something that would allow Squid to handle both HTTP and HTTPS traffic?

This is what I’m seeing in the log:

1624658033.150  59887 10.108.0.18 TCP_MISS/503 4300 GET http://squidguard.com/favicon.ico - HIER_DIRECT/3.223.115.185 text/html
1624658042.966  60608 10.108.0.18 TCP_MISS/503 4392 GET http://squidguard.com/ - HIER_DIRECT/3.223.115.185 text/html

The error on the browser page says

The following error was encountered while trying to retrieve the URL: http://squidguard.com/
Connection to 3.223.115.185 failed.
The system returned: (110) Connection timed out
The remote host or network may be down. Please try the request again.

The remote host or network isn’t down, though. I can reach it when not going through the proxy.

My squid.conf:

acl vdi src 10.108.0.0/20

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 intermediate_fetching transaction_initiator certificate-fetching
http_access allow intermediate_fetching

http_access deny !Safe_ports

http_access allow localhost manager
http_access deny manager

http_access allow vdi

http_access deny all

http_port 0.0.0.0:3128
http_port 0.0.0.0:3129 ssl-bump cert=/etc/squid/ssl_cert/myCA.pem generate-host-certificates=on
https_port 0.0.0.0:3130 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=20MB cert=/etc/squid/ssl_cert/myCA.pem

sslcrtd_program /usr/lib64/squid/security_file_certgen -s /var/lib/squid/ssl_db -M 20MB
ssl_bump stare all
ssl_bump bump all

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

shutdown_lifetime 1 second

I don’t have iptables running so I don’t have any REDIRECT rules. I do suspect this to be the problem.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.