Search squid archive

Re: Squid checking for both dstdomain and IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Spam detection software, running on the system "master.squid-cache.org",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Thanks for replying. I was already following the provided
  link for reference. It seems that splicing on step2 was correct, but in fact
   there were other things that I missed. acl allowed_sites dstdomain "/etc/squid/allowed-sites.txt"
   # Creates acl containing domain names for splice. acl spliced_sites ssl::server_name
   "/etc/squid/allowed-sites.txt" http_access allow allowed [...] 

Content analysis details:   (5.6 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                            [171.171.0.181 listed in zen.spamhaus.org]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 NORMAL_HTTP_TO_IP      URI: URI host has a public dotted-decimal IPv4
                             address
 0.0 NUMERIC_HTTP_ADDR      URI: Uses a numeric IP address in URL
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                            valid
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                            author's domain
-0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
                            envelope-from domain
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS
 0.0 UNPARSEABLE_RELAY      Informational: message has unparseable relay
                            lines
-0.0 T_SCC_BODY_TEXT_LINE   No description available.
-0.0 NICE_REPLY_A           Looks like a legit reply (A)
 0.0 NO_FM_NAME_IP_HOSTN    No From name + hostname using IP address


--- Begin Message ---
Thanks for replying.
I was already following the provided link for reference.
It seems that splicing on step2 was correct, but in fact there were other things that I missed.

acl allowed_sites dstdomain "/etc/squid/allowed-sites.txt"
# Creates acl containing domain names for splice.
acl spliced_sites ssl::server_name "/etc/squid/allowed-sites.txt"
http_access allow allowed_sites
# This eliminates the browser error containing the IP from the website.
# >> I don't know if there are caveats for allowing free access to SSL_ports. <<
http_access allow SSL_ports

acl step1 at_step SslBump1
acl step2 at_step SslBump2

ssl_bump peek step1
ssl_bump splice step2 spliced_sites
# Same effect of 'deny all' for https websites.
ssl_bump terminate all
...

*Apparently* that does it.
If I stated anything wrong, please correct me.

Cheers.


Em 28/06/2022 10:52, Alex Rousskov escreveu:
On 6/28/22 08:08, Bruno de Paula Larini wrote:

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.

Most likely, what is actually happening is that Squid does not have domain information during SslBump step1, and then gets that information during step2. Squid http_access rules apply to each SslBump step, so you have to write them accordingly.

Available to Squid information and expected Squid behavior is documented for each step at the following wiki page. There are bugs in that algorithm _implementation_, but they are being fixed, and I am not aware of better docs: https://wiki.squid-cache.org/Features/SslPeekAndSplice#Processing_steps


HTH,

Alex.


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
...

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users


--- End Message ---
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux