[squid-users] Bypassing SSL Bump for dstdomain

From: Dan Charlesworth <dan_at_getbusi.com>
Date: Tue, 5 Mar 2013 15:51:31 +1100

Hi

I've recently set up a very simple Squid 3.3.1 deployment to test out Server First bumping and Mimicking in a REDIRECT type intercept configuration.

It's working quite nicely, but I'm trying to accommodate a scenario where an admin would like to disable bumping for certain webistes, for example internet banking ones.

I basically have the exact same "ssl_bump" parameters from the config example and yet requests matching the ACL are still being bumped as evidenced by:
- The full HTTPS URLs being recorded in the access log.
- My client browser continuing to show that the certificate is signed by the squid-signed CA when accessing the dstdomain.

I feel like I'm making some obvious mistake here, but can't see the forest right now.

In case it isn't clear in my config, I'm trying to prevent bumping the ACL "bump-bypass"

Thanks!

#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#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
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Let user specify domains to avoid decrypting, such as internet banking
acl bump-bypass dstdomain .commbank.com.au

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# SSL Settings #

ssl_bump none localhost
ssl_bump none bump-bypass
ssl_bump server-first all

sslproxy_cert_error deny all

# Setup Options for the dynamic certificate db and helper
sslcrtd_program /usr/bin/squid_ssl_crtd -s /usr/local//squid/var/ssl_db -M 4MB
sslcrtd_children 5

# Listening ports
http_port 3128
http_port 3129 intercept
https_port 3130 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/usr/local/squid/var/ssl_cert/myCA.pem

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
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

# DNS stuff
visible_hostname squid.local

# Making the access log have all the info we need
strip_query_terms off

# Debugging
#debug_options 28,3

Access log excerpt:
1362457811.732 136 10.0.1.164 TCP_MISS/302 611 GET https://www3.netbank.commbank.com.au/netbank/bankmain - PINNED/140.168.80.158 text/html
1362457812.162 107 10.0.1.164 TCP_MISS/200 7673 GET https://www.my.commbank.com.au/netbank/Logon/Logon.aspx - PINNED/140.168.131.21 text/html
1362457812.695 75 10.0.1.164 TCP_MISS/200 7657 GET https://www.my.commbank.com.au/netbank/Logon/Logon.aspx - PINNED/140.168.131.21 text/html
Received on Tue Mar 05 2013 - 04:51:50 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 05 2013 - 12:00:03 MST