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

    Dglog2 for dansguardian log analysis

    Scheduled Pinned Locked Moved pfSense Packages
    8 Posts 3 Posters 3.3k 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.
    • R Offline
      rjcrowder
      last edited by

      Just thought I'd share in case anyone is interested… I had been installing webmin and the dansguardian webmin module to get a decent dansguardian reporting tool. I just figured out that it was fairly easy to get dglog2 working.

      Steps are:
      1.) Install lightsquid. Probably not necessary, but the install turns on Perl CGI support in the web server.
      2.) Copy dglog2.pl into a directory under /usr/local/www (such as /usr/local/www/dglog2)
      3.) Create an index.cgi file in the directory above.
      4.) Add "index.cgi" to the server.indexfiles entry in /etc/inc/system.inc

      Might need to do a reboot, but that's basically it. dglog2 is now accesible as http://yourhost.com/your_directory/

      I've attached the dglog2.pl file and an index.cgi file if anyone wants it - just need to remove the .txt extension

      dglog2.pl.txt
      index.cgi.txt

      1 Reply Last reply Reply Quote 0
      • W Offline
        wyzeguy
        last edited by

        First off, thanks so much for posting this solution! Was exactly what I was looking for  :)

        Secondly, for anyone else who might be bumping into the same problem, I wound up having to change the permissions on both files to set them as executable. Prior to that I was getting a "500 Internal Server Error" and lighttpd would core dump. Ran:

        chmod 755 * 
        

        in the dglog2 directory and all is well now.

        1 Reply Last reply Reply Quote 0
        • R Offline
          rjcrowder
          last edited by

          @wyzeguy:

          First off, thanks so much for posting this solution! Was exactly what I was looking for  :)

          You're welcome. Sorry about the chmod… BTW... if you want to add it to your pfSense menu, you can copy the attached php file to /usr/local/www and add a line like this...

          $status_menu[] = array(gettext("Content Filter Logs"), "/content_filter_logs.php");
          

          into fbegin.inc somewhere around line 199 (where it is building the "status menu" array).

          content_filter_logs.php.txt

          1 Reply Last reply Reply Quote 0
          • W Offline
            wyzeguy
            last edited by

            Thank you again! That was going to be my next project!

            1 Reply Last reply Reply Quote 0
            • W Offline
              wheelz
              last edited by

              I was attempting to try this out, however I can only get a blank browser when I go to it.  Now I did not install light squid as I already have a version of squid installed.  I was trying to just get it working through the default https instance of the GUI.  Is that possible?  I copied the files to /usr/local/www/dglog2 and did the chmod command.  I also made the edits to get the menu to show up in the status section.

              I did notice in the pl script is talks about installing a cgi component and a compression component.  Is this what I am missing?  I was hoping to not have to figure out how to do make, etc.  Is is possible to just use pkg_add or pbi_add to add the needed packages?  I tried cgi-lib, cgi-lib_pl, and gzip but that didn't seem to make a difference.

              1 Reply Last reply Reply Quote 0
              • R Offline
                rjcrowder
                last edited by

                Lightsquid is not "squid" - it is a squid reporting package. It installs the perl CGI stuff correctly. I'm sure you can make perl CGI work without installing it, but I don't know the steps.

                1 Reply Last reply Reply Quote 0
                • W Offline
                  wheelz
                  last edited by

                  Oh, I didn't realize that.  That makes it easy.  It seems to be working now.

                  Playing around with light squid as well.  It is strange but on one of my two boxes I get errors on the lightsquid.  On the report I get:

                  LigthSquid diagnostic.
                  Error : report folder '/var/lightsquid/report' not contain any valid data! Please run lightparser.pl (and check 'report' folder content)
                  Please check config file !

                  I've already followed the directions and there is content in the /var/lightsquid/report directory but I still get this error.  Also I get this on the realtime tab:

                  Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /usr/local/www/sqstat/sqstat.class.php on line 426 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /usr/local/www/sqstat/sqstat.class.php on line 426 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /usr/local/www/sqstat/sqstat.class.php on line 426 Warning:

                  That message repeats quite a bit.  I don't suppose you've seen this before?

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rjcrowder
                    last edited by

                    Really haven't messed with lightsquid much… sorry.

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