<div dir="ltr">After being side-tracked with a few different project, I ended up with the config below. It appears to do the right things, though the ACL organization could use some cleanup... <div>(Browsing to authorized sites works, browsing to something else, i get a denied page from squid)</div><div><br></div><div>However, even though <a href="http://msdn.microsoft.com" target="_blank">msdn.microsoft.com</a> is on my whitelist, it appears to "timeout". Looking at the logs, I see entries like this:</div><br>2016/09/20 15:10:19.640 kid1| SECURITY ALERT: Host header forgery detected on local=<a href="http://65.54.226.150:443" target="_blank">65.54.226.150:443</a> remote=<a href="http://10.0.32.177:51984" target="_blank">10.11.12.13:51984</a> FD 18 flags=33 (local IP does not match any domain IP)<br>2016/09/20 15:10:19.640 kid1| SECURITY ALERT: By user agent: <br>2016/09/20 15:10:19.640 kid1| SECURITY ALERT: on URL: <a href="http://msdn.microsoft.com:443" target="_blank">msdn.microsoft.com:443</a><br>2016/09/20 15:10:19.640 kid1| 4,2| errorpage.cc(1262) BuildContent: No existing error page language negotiated for ERR_CONFLICT_HOST. Using default error file.<br>2016/09/20 15:10:19.641 kid1| 20,2| store.cc(954) checkCachable: StoreEntry::checkCachable: NO: not cachable<br>2016/09/20 15:10:19.641 kid1| 20,2| store.cc(954) checkCachable: StoreEntry::checkCachable: NO: not cachable<br>2016/09/20 15:10:19.641 kid1| 88,2| client_side_reply.cc(2001) processReplyAccessResult: The reply for CONNECT <a href="http://msdn.microsoft.com:443" target="_blank">msdn.microsoft.com:443</a> is ALLOWED, because it matched SniBypass<br>2016/09/20 15:10:19.641 kid1| 33,2| client_side.cc(925) deferRecipientForLater: clientSocketRecipient: Deferring request <a href="http://msdn.microsoft.com:443" target="_blank">msdn.microsoft.com:443</a><div><div><br></div><div>What is interesting is that we changed from using 8.8.8.8 as our DNS server to a locally installed bind instance, and we no longer see any issues.</div><div>that is NOT what I expected... I can't explain why the client browser was hanging. Any suggestions?</div><div><br></div><div><div>It's all happy now, with the following config, with a firewall doing policy based routing, a local iptables rule to redirect from port 443 to 8443, and from 80 to 3129, as well as the certificate deployed as trusted on each endpoint:</div><div><br></div><div>squid.conf:</div><div># setup standard ports</div>acl SSL_ports port 443<br>acl Safe_ports port 80<br>acl Safe_ports port 21<br>acl Safe_ports port 443<br>acl Safe_ports port 70<br>acl Safe_ports port 210<br>acl Safe_ports port 1025-65535<br>acl Safe_ports port 280<br>acl Safe_ports port 488<br>acl Safe_ports port 591<br>acl Safe_ports port 777<br>acl CONNECT method CONNECT<div># for security<br>http_access deny !Safe_ports<br>http_access deny CONNECT !SSL_ports</div><div><br></div><div># not actually used and blocked by local firewall on host, but squid complains if it's not there...<br>http_port 3128</div><div><br></div><div># http intercept, and ACL that matches that inbound port<br>http_port 3129 intercept<br>acl http_proxy myportname 3129</div><div><br></div><div># same for https<br>https_port 8443 intercept ssl-bump \<br>    generate-host-certificates=on \<br>    dynamic_cert_mem_cache_size=64<wbr>MB \<br>    cert=/etc/squid/ssl/proxy.pem \<br>    key=/etc/squid/ssl/proxy.key \<br>    cafile=/etc/squid/ssl/<a href="http://proxy.pe">proxy.pe</a><wbr>m<br>acl https_proxy myportname 8443<br><br></div><div>always_direct allow all</div><div><br></div><div># define the steps needed for bumping...<br>acl step1 at_step SslBump1<br>acl step2 at_step SslBump2<br>acl step3 at_step SslBump3</div><div><br></div><div># and the list of domains that are allowed</div><div>acl SniBypass ssl::server_name_regex -i "/etc/squid/snibypass.acl"<br>acl http_bypass dstdom_regex -n -i "/etc/squid/snibypass.acl"</div><div><br></div><div># ensure we have target SSL port when checking data<br>acl https_ok all-of SniBypass SSL_ports</div><div># and the destination domain when not SSL...<br>acl http_ok all-of http_bypass Safe_ports</div><div><br></div><div># splice when we know the target matches</div><div>ssl_bump splice SniBypass</div><div># peek and bump otherwise<br>ssl_bump peek step1<br>ssl_bump stare step2<br>ssl_bump bump all</div><div><br></div><div># some options for the certificate generation..<br>sslproxy_options NO_SSLv2,NO_SSLv3,SINGLE_ECDH_<wbr>USE<br>sslproxy_cert_sign_hash sha256<br>sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 64MB<br>sslcrtd_children 8 startup=1 idle=1</div><div><br></div><div># for http, let's block if we're not on the whitelist</div><div>http_access         deny !http_ok        http_proxy</div><div># for https, let's wait until step3 of the bumping, so we can replace the SSL content post-bumping)<br>http_access         deny !https_ok step3 https_proxy</div><div><br></div><div># never cache anything<br>cache deny all</div><div><br></div><div>#for windows updates<br>quick_abort_min -1<br>range_offset_limit 0 all</div><div><br></div><div>shutdown_lifetime 2 seconds<br>connect_timeout 20 seconds<br>#debug_options ALL,2</div><div><br></div></div></div></div>