[squid-users] Squid checking for both dstdomain and IP

Bruno de Paula Larini bruno.larini at riosoft.com.br
Tue Jun 28 12:08:00 UTC 2022


Hi list.

I have a pretty simple configuration for website filtering (intercepted) 
and ssl_bump, which follows below.
However, for some reason, it seems Squid resolves the website domain 
address, then uses the IP to compare with the ACLs.
As the IP is not included in the ACL, the access to the website is denied.
Before that, it already checked for the domain name. I can tell based on 
the error from the browser.
I'm using Squid version 5.5.

For example, while trying to open https://repo.maven.apache.org/ 
(included in the allowed sites), the browser shows the error:

     The following error was encountered while trying to retrieve the 
URL: https://199.232.192.215/*

     Access Denied.

If I replace 'deny all' with 'allow all', the website will open as expected.
Is there something wrong with my config? I have something similar 
running and working on version 4.4 (unless I'm missing something).
I'm still only splicing for now.

Thanks for the help!


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

acl allowed_sites dstdomain "/etc/squid/allowed-sites.txt"
http_access allow allowed_sites

acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump splice all

tls_outgoing_options capath=/etc/pki/tls/certs options=ALL

sslcrtd_program /usr/lib64/squid/security_file_certgen -s 
/var/lib/squid/ssl_db -M 8MB
sslcrtd_children 3

http_access allow localhost

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

# Squid normally listens to port 3128
http_port 192.168.10.10:8080
http_port 192.168.10.10:3128 intercept
https_port 192.168.10.10:3129 tls-cert=/etc/squid/ssl/squidCA.pem 
tls-key=/etc/squid/ssl/squidCA.key ssl-bump intercept 
generate-host-certificates=on dynamic_cert_mem_cache_size=8MB
...

### IPTABLES
...
iptables -t nat -A PREROUTING -i eth0 -s 192.168.10.0/24 -p tcp --dport 
80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -s 192.168.10.0/24 -p tcp --dport 
443 -j REDIRECT --to-port 3129
...



More information about the squid-users mailing list