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

Tutorial: How to Install SquidAnalyzer 6.5 on pfSense 2.4

Scheduled Pinned Locked Moved Cache/Proxy
17 Posts 8 Posters 7.0k 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.
  • P
    Presbuteros
    last edited by Mar 15, 2017, 10:55 PM Mar 15, 2017, 9:52 PM

    This tutorial will show how to install the correct FreeBSD 11 SquidAnalyzer package on pfSense 2.4

    This tutorial assumes:

    • Squid is already installed, configured, and running.

    • Squid logs are enabled and the default location is used

    /var/squid/logs
    
    • User has access to the shell.

    1. In the shell enter```
    pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/squidanalyzer-6.5.txz

    
    **2.** You will receive a confirmation of the install.
    
    

    Message from squidanalyzer-6.5:

    1. Modify your httpd.conf to allow access to HTML output like follow:
            Alias /squidreport /usr/local/www/squidreport
            <directory usr="" local="" www="" squidreport="">Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1</directory>
    2. If necessary, give additional host access to SquidAnalyzer in httpd.conf.
      Restart and ensure that httpd is running.
    3. Browse to http://my.host.dom/squidreport/ to ensure that things are working
      properly.
    4. Setup a cronjob to run squid-analyzer daily:

    # SquidAnalyzer log reporting daily
        0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1

    or run it manually.
    For more information, see /usr/local/share/doc/squidanalyzer/README file.

    
    *****NOTE***** THERE IS NO HTTPD.CONF - Instead there is squidanalyzer.conf
                          A DIFFERENT CRON COMMAND WILL BE USED
    
    The squidanalyzer.conf file is in usr/local/etc/squidreport/
    
    **3.** Edit the squidanalyzer.conf
    
    Change this
    

    Set the path to the Squid, squidGuard and/or ufdbGuard log files

    LogFile /var/log/squid3/access.log

    
    into this
    

    Set the path to the Squid, squidGuard and/or ufdbGuard log files

    LogFile /var/squid/logs/access.log

    
    **4.** Run the command in shell once:```
    cd /usr/local/bin/ && perl squid-analyzer
    

    This command will process Squid's files and may take some time. Allow the command to complete before proceeding to step 5.

    5. Browse to x.x.x.x/squidreport
        The report generated from the command in step 4 should be displayed in the browser.

    6. Set the command from step 4 as a cron job to your desired frequency.

    1 Reply Last reply Reply Quote 0
    • T
      Topper727
      last edited by Sep 6, 2017, 3:35 AM Sep 6, 2017, 3:12 AM

      I started this while back.

      https://forum.pfsense.org/index.php?topic=87982.90

      Make sure you have 2.4 . as 2.3.4 or something does not work.  Glad to see someone besides me found easy way to install it.. or someone that put in repositorys

      Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
      Current: 2000 MHz, Max: 2667 MHz
      8 CPUs: 2 package(s) x 4 core(s)
      8152 MiB and 600meg 10k drive
      Pfsense

      Dell 2950 g3 server
      Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
      Current: 2000 MHz, Max: 2667 MHz
      8 CPUs: 2 package(s) x 4 core(s)
      8152 MiB and 600meg 10k drive
      Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by Sep 6, 2017, 6:22 PM Sep 6, 2017, 9:19 AM

        SquidAnalyzer is in marcello's unofficial repo, whole lot better way to install than this manual messing.

        For 2.4, use

        
        fetch -q -o /usr/local/etc/pkg/repos/Unofficial.conf https://raw.githubusercontent.com/marcelloc/Unofficial-pfSense-packages/master/Unofficial.24.conf
        
        
        K 1 Reply Last reply Oct 6, 2021, 12:39 AM Reply Quote 0
        • K
          KOM
          last edited by Sep 6, 2017, 2:23 PM

          SquidAnalyzer is in marcello's unofficial repo, whole lot better way to install than this manual messing.
          fetch -q -o /usr/local/etc/pkg/repos/Unofficial.conf https://github.com/marcelloc/Unofficial-pfSense-packages/blob/master/Unofficial.24.conf

          Hmm.  The command succeeds without error but there is nothing in the Package Manager when you check it afterwards.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by Sep 6, 2017, 5:18 PM

            You need to go to the installed packages tab (or otherwise trigger pkg update).

            1 Reply Last reply Reply Quote 0
            • K
              KOM
              last edited by Sep 6, 2017, 6:20 PM Sep 6, 2017, 6:08 PM

              You need to go to the installed packages tab (or otherwise trigger pkg update).

              Already did that and it didn't make any difference but it did give me a clue.  Shelling in and running pkg update manually gave this:

              pkg: Error parsing: '/usr/local/etc/pkg/repos//Unofficial.conf': error while parsing <unknown>: line: 7, column: 0 - 'key must begin with a letter', character: '<'</unknown>

              Edit:  OK, it appears that when you run

              fetch -q -o /usr/local/etc/pkg/repos/Unofficial.conf https://github.com/marcelloc/Unofficial-pfSense-packages/blob/master/Unofficial.24.conf
              

              You are getting the HTML of that particular Github webpage and not the file contents.  My Unofficial.conf was stuffed with bogus HTML.

              When I visited the page and saw the actual 6 lines of code, I made my own config and it's now showing E2Guardian4 as expected.

              1 Reply Last reply Reply Quote 0
              • K
                KOM
                last edited by Sep 6, 2017, 6:19 PM

                Read my edit.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by Sep 6, 2017, 6:22 PM

                  Fixed the link.

                  1 Reply Last reply Reply Quote 0
                  • T
                    Topper727
                    last edited by Sep 7, 2017, 4:19 AM

                    Just about looking close enough to a real package to install now.. If I had knowledge on how I would make official.

                    Dell 2950 g3 server
                    Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                    Current: 2000 MHz, Max: 2667 MHz
                    8 CPUs: 2 package(s) x 4 core(s)
                    8152 MiB and 600meg 10k drive
                    Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                    1 Reply Last reply Reply Quote 0
                    • P
                      Presbuteros
                      last edited by Sep 23, 2017, 6:44 AM

                      Thank you everyone for showing me a more concise way. I appreciate the help. Glad to see package moving forward.

                      1 Reply Last reply Reply Quote 0
                      • X
                        Ximulate
                        last edited by Oct 21, 2017, 12:51 PM Oct 18, 2017, 3:45 PM

                        Followed the instructions here to fetch marcello's unofficial repo and installed squidanalyzer, which went fine. However, report isn't loading. Getting:

                        Error: Could not find report index file.
                        Check and save Squid Analyzer settings.

                        Edit: My settings:
                        Squid Log Analyzer > General Settings > Squid Log : /var/squid/logs/access.log
                        Services > Proxy Server > General > Enable Access Logging: Enabled
                        Services > Proxy Server > General > Log Store Directory: /var/squid/logs

                        Using Putty to SSH to shell, as Admin, I can access the /var/squid/logs and verify the log files are there. If I SSH as a User, I can't access the /var/squid directory. I assume all this has to do with permissions. I also assume the permissions are set this way for a reason.

                        1 Reply Last reply Reply Quote 0
                        • X
                          Ximulate
                          last edited by Oct 21, 2017, 12:51 PM

                          Any suggestions about how to get the Squidanalyser reports to work?

                          1 Reply Last reply Reply Quote 0
                          • M
                            maikcat
                            last edited by Oct 24, 2017, 11:18 AM

                            after installing & enable squidanalyzer you do need to run /usr/local/bin/squid-analyzer manually

                            at least this worked for me…

                            Michael.

                            1 Reply Last reply Reply Quote 0
                            • X
                              Ximulate
                              last edited by Oct 24, 2017, 12:38 PM

                              That worked. Thank you!

                              1 Reply Last reply Reply Quote 0
                              • B
                                blaze1119
                                last edited by Dec 5, 2018, 5:57 AM

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • B
                                  blaze1119
                                  last edited by Dec 5, 2018, 6:47 AM

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    kasalencar @doktornotor
                                    last edited by Oct 6, 2021, 12:39 AM

                                    @doktornotor mesmo instalando o repositório não oficial, e buscando o pacote, ele gera essa recomendações de conf mesmo:

                                    Após instalar o pacote temos a seguinte recomendação. Você consegue executar?

                                    1. Modify your httpd.conf to allow access to HTML output like follow:
                                      Alias /squidreport /usr/local/www/squidreport

                                    Options -Indexes FollowSymLinks MultiViews
                                    AllowOverride None
                                    Order deny,allow
                                    Deny from all
                                    Allow from 127.0.0.1

                                    1. If necessary, give additional host access to SquidAnalyzer in httpd.conf.
                                      Restart and ensure that httpd is running.
                                    2. Browse to http://my.host.dom/squidreport/ to ensure that things are working
                                      properly.
                                    3. Setup a cronjob to run squid-analyzer daily:

                                    SquidAnalyzer log reporting daily

                                    0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1

                                    or run it manually.
                                    For more information, see /usr/local/share/doc/squidanalyzer/README file.

                                    Cleaning up cache… done.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                      This community forum collects and processes your personal information.
                                      consent.not_received