Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Squid HTTPS/SSL Interception

    Scheduled Pinned Locked Moved Italiano
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      ohifra
      last edited by ohifra

      Buon pomeriggio, da qualche setimana sto impazzendo nel configurare il proxy ssl con squid.
      Ho seguito questi passi nel configurare l'HTTPS/SSL Interception :
      Ho creato un nuovo CA in system/cert manager
      mi sono spostato in Proxy Server: General Settings/General
      e ho impostato il tutto così
      (ovviamente la voce HTTPS/SSL Interception è selezionata) per ora l'ho disattivata perchè altrimenti non riesco a navigare

      cc20723a-97eb-4d18-ae3a-a8d7965128e5-immagine.png

      La navigazione sui siti in https funziona correttamente per qualche minuto, poi ho questo errore su alcuni siti tipo google.it, google.com, facebook.com

      Connessione sicura non riuscita
      
      Si è verificato un errore durante la connessione a www.google.it. SSL ha ricevuto un pacchetto che eccede la dimensione massima consentita. Codice di errore: SSL_ERROR_RX_RECORD_TOO_LONG
      
          La pagina che si sta cercando di visualizzare non può essere mostrata in quanto non è possibile verificare l’autenticità dei dati ricevuti.
          Contattare il responsabile del sito web per informarlo del problema.
      

      disattivo l'HTTPS/SSL Interception in squid e tutto torna alla normalità.

      a grandi linee la mia configurazione è:
      pfsense 2.4.4 p3 64bit
      squid 0.4.44_8
      uso il dns forwarder dentro pfsense così configurato

      dc65041f-5625-4d9f-acda-63f87ea96c82-immagine.png

      Il lavoro di dns server viene svolto da 2 macchine virtuali nella stessa rete della lan di pfsense con dentro installato pihole.

      Se vi dovessero servire altri parametri o configurazioni fatemi sapere.
      Grazie mille in anticipo
      Francesco

      O 1 Reply Last reply Reply Quote 0
      • O
        ohifra @ohifra
        last edited by

        @ohifra

        Ho effettuato altre modifiche su pfsense

        32c4d5d9-ff0f-40ad-aea3-afc88a805bb4-immagine.png

        ma ho sempre lo stesso problema anche mettendo intermediate anzichè modern

        1 Reply Last reply Reply Quote 0
        • frankzF
          frankz
          last edited by

          Ciao , ho avuto lo stesso errore e come te per diverso tempo non sono riuscito a risolvere il problema.
          Guardando bene in giro in particolare nelle docs di pfsense viene menzionato l'errore 409 dovuto a una disparità dei contenuti , ecco l'estratto :Sites not loading with splice / Error 409 in access log

          As a security measure, squid will not allow a user to connect to a site that has a hostname that does not match its IP address. This prevents clients from hardcoding or altering DNS responses to evade access controls. The side effect of this, however, is that sites which employ round-robin DNS or other DNS optimizations can cause squid to block or drop connections those sites unintentionally. The squid access log will have a 409 (Conflict) error code when a connection is dropped for this reason.

          This happens with sites such as Google or Facebook when the client and squid use different sources for DNS, and thus get different DNS results for the same query because the results are randomized. Even though the address for the server is valid, the disparity causes squid to drop the connection.

          The solution is to have the clients use the firewall as their DNS server, so that both squid and clients use the same DNS source and the results will match.

          Insomma ho risolto modificando i dns dei client direttamente sul firewall e se hai un dns interno , ti consiglio in primis di dichioarare il firewall come dns primario e il secondario il tuo server interno . Inoltre devi assolutamente abilitare il dns resolver addizionando il rewrite per il tuo dominio o host di tuo interesse . Es. dominio.local occorre dichiaralo in rewrite domain ovvero quando il firewall tenta di risolvere un host interno.local lo invio al dns interno . Spero di essere stato chiaro , anche se con i dns roundy robin e meglio esculderli dal qualsiasi controllo.

          O 1 Reply Last reply Reply Quote 1
          • O
            ohifra @frankz
            last edited by

            Grazie mille per la cordiale risposta.
            Sono diversi anni che provo a risolvere questo problema ma con pfsense non ero mai riuscito a venirne a capo.
            Provo subito sulla wifi aziendale e poi proseguo con lan e le altre reti.
            Grazie ancora
            Ti terrò aggiornato.

            1 Reply Last reply Reply Quote 0
            • frankzF
              frankz
              last edited by

              Ciao , fammi sapere. Comunque è importante disattivare il dns forward e abilitare il dns resolver per permettere solo al firewall in primis di risolvere gli ip e relativa cache di squid .Inoltre come citato prima ti consiglio di rilevare i network da bypassare tramite una interrogazione ASN attivare glia alias ed escluderli da squid . Controlla i log in tempo reale e non dovresti vedere più errori 409 .

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.