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

    Can't start squidGuard

    Scheduled Pinned Locked Moved Cache/Proxy
    23 Posts 21 Posters 12.4k 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.
    • D
      digifant
      last edited by

      Rebuilding the DB only lasts till a reboot.

      1 Reply Last reply Reply Quote 0
      • K
        kudamuda
        last edited by

        I am facing the same problem too.
        Is there away to get the blacklist autorebuild & the squidguard will run automatically after a reboot?

        thanks!

        1 Reply Last reply Reply Quote 0
        • K
          kudamuda
          last edited by

          I think I found a workaround. I am using amd64 pfsense 2.2.2

          1. goto the blacklist configuration tab for squidGuard, click download.
                - the system will update & reconfigure the blacklist.

          2. you shall find a script file at /tmp/squidGuard_blacklist_update.sh

          3. copy this sh file to somewhere else, eg. /usr/local/bin/squidGuard_blacklist_update.sh

          4. edit the /usr/local/etc/rc.d/squid.sh to include the above script.

          therefore, after a reboot, the system would download a fresh blacklist & do the neccessary configuration before start the squid.  ;)

          tq

          1 Reply Last reply Reply Quote 0
          • T
            TheBlueRaja
            last edited by

            @kudamuda:

            I think I found a workaround. I am using amd64 pfsense 2.2.2

            1. goto the blacklist configuration tab for squidGuard, click download.
                  - the system will update & reconfigure the blacklist.

            2. you shall find a script file at /tmp/squidGuard_blacklist_update.sh

            3. copy this sh file to somewhere else, eg. /usr/local/bin/squidGuard_blacklist_update.sh

            4. edit the /usr/local/etc/rc.d/squid.sh to include the above script.

            therefore, after a reboot, the system would download a fresh blacklist & do the neccessary configuration before start the squid.  ;)

            tq

            Can you tell me how you managed this?  I tried to do this as you say however 2 things are unclear:-

            1. /usr/local/etc/rc.d/squid.sh appears to be overwritten every reboot which means any changes made are overwritten.
            2. Where in the script did you place it? I thought this would suffice but cant test due to 1)
            rc_start() {
                    if [ -z "`ps auxw | grep "[s]quid -D"|awk '{print $2}'`" ];then
                    /usr/pbi/squid-amd64/sbin/squid -D
                    /usr/local/bin/squidGuard_blacklist_update.sh
            fi
            
            1 Reply Last reply Reply Quote 0
            • I
              ismaelnoble
              last edited by

              I managed to produce a working system by just:

              1. goto the blacklist configuration tab for squidGuard, click download.
                    - the system will update & reconfigure the blacklist.

              2. you shall find a script file at /tmp/squidGuard_blacklist_update.sh

              3. copy this sh file to /usr/local/etc/rc.d/

              granted that i did build on kudamuda's work which was spot on. i am rather worried about the initial error though, this hack is only so as to continue moving along with my setup. once i find some time ill look further into the error, from the logs i can tell that it has something to do with squidGuard losing its DB on boot… ;)

              1 Reply Last reply Reply Quote 0
              • N
                noor
                last edited by

                @kudamuda:

                I think I found a workaround. I am using amd64 pfsense 2.2.2

                1. goto the blacklist configuration tab for squidGuard, click download.
                      - the system will update & reconfigure the blacklist.

                2. you shall find a script file at /tmp/squidGuard_blacklist_update.sh

                3. copy this sh file to somewhere else, eg. /usr/local/bin/squidGuard_blacklist_update.sh

                4. edit the /usr/local/etc/rc.d/squid.sh to include the above script.

                therefore, after a reboot, the system would download a fresh blacklist & do the neccessary configuration before start the squid.  ;)

                tq

                Dear Expert,

                I am trying to follow the instructions which need your help.

                1-  I have Copied the squidGuard_blacklist_update.sh from the path /tmp
                But i unable to understand the above steps no 4  can you guide me in detail how i can follow the above step no 4 need your help in detail.

                thanks in Advance.

                Regards,
                Noor Uz Zaman

                1 Reply Last reply Reply Quote 0
                • C
                  chidgear
                  last edited by

                  Hi!
                  I did this:
                  After downloading a blacklist from shallalist.de , create a target Category (call it as you want) add a least one domain and start Squidguard with the apply button (if it hasn't started yet) According to certain posts regarding to the Squidguar manual, this is a necesary condition to use blacklists and another configurations. In my particular case, I've created a target category called "White_list" on which I've added the sites contained in the default blacklist but that I wish to access anytime (for example, wikipedia.org, wikimedia.org and pfsense.org).

                  after doing this, I can reboot the server, an the SquidGuard service boots automatically after one minute.

                  Try it and, if it works for you, come back and tell us!

                  1 Reply Last reply Reply Quote 0
                  • K
                    kot
                    last edited by

                    @chidgear:

                    Hi!
                    I did this:
                    After downloading a blacklist from shallalist.de , create a target Category (call it as you want) add a least one domain and start Squidguard with the apply button (if it hasn't started yet) According to certain posts regarding to the Squidguar manual, this is a necesary condition to use blacklists and another configurations. In my particular case, I've created a target category called "White_list" on which I've added the sites contained in the default blacklist but that I wish to access anytime (for example, wikipedia.org, wikimedia.org and pfsense.org).

                    after doing this, I can reboot the server, an the SquidGuard service boots automatically after one minute.

                    Try it and, if it works for you, come back and tell us!

                    Thanx. It really works.

                    1 Reply Last reply Reply Quote 0
                    • K
                      knottolf
                      last edited by

                      You can try the following if you have / had a line similar to this during install (and it's not the lack of blacklist update!):
                      "Warning: file_put_contents(/usr/pbi/squidguard-amd64/etc/squidGuard/squidguard_conf.xml): failed to open stream: No such file or directory in /usr/local/pkg/squidguard.inc on line 1032"

                      Open the file '/usr/local/pkg/squidguard_configurator.inc'

                      Find the line:
                      define('SQUIDGUARD_WORKDIR', SQUIDGUARD_LOCALBASE . '/etc/squidGuard');

                      Change it to:
                      define('SQUIDGUARD_WORKDIR', SQUIDGUARD_LOCALBASE . '/local/etc/squidGuard');

                      Worked for me!

                      1 Reply Last reply Reply Quote 0
                      • J
                        jerekyox
                        last edited by

                        I have tried ismaelnoble's approach. Working for me so far.

                        1 Reply Last reply Reply Quote 0
                        • J
                          jmccoy555
                          last edited by

                          Did the trick for me to….. this has been driving me mad!!!!

                          Thanks.

                          @chidgear:

                          Hi!
                          I did this:
                          After downloading a blacklist from shallalist.de , create a target Category (call it as you want) add a least one domain and start Squidguard with the apply button (if it hasn't started yet) According to certain posts regarding to the Squidguar manual, this is a necesary condition to use blacklists and another configurations. In my particular case, I've created a target category called "White_list" on which I've added the sites contained in the default blacklist but that I wish to access anytime (for example, wikipedia.org, wikimedia.org and pfsense.org).

                          after doing this, I can reboot the server, an the SquidGuard service boots automatically after one minute.

                          Try it and, if it works for you, come back and tell us!

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