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

Squidguard… problems and questions

Scheduled Pinned Locked Moved pfSense Packages
31 Posts 8 Posters 39.5k 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
    dvserg
    last edited by Mar 18, 2008, 8:02 PM Mar 18, 2008, 7:26 PM

    I looking config and see, what you not configure you SG. For this scheme

    [blk_BL_adv]            [x] deny

    [blk_BL_webtv]          [x] deny

    Default access [all]    [ ] deny

    must have config

    pass !in-addr !blk_BL_adv !blk_BL_webtv all<
    After end configuration you SG, you must press APPLY button on general page.
    This generated new config and started squid & SG with new options.
    –-

    meant "pass all traffic EXCEPT what matches the categories I've checked off"

    [blk_BL_webtv]    [ ] deny ) - this will be 'white list' -> selected category will allowed.

    4 - can I just ignore the GUI and edit the .conf directly - if I did, would my changes be overridden?

    Yes, you can, but new GUI Apply will rewrite you config (use for edit /usr/local/etc/squid/squidGuard.conf)

    A little background - the main thing I'm trying to block is social-networking sites

    I have the same problem. You can use self Destination for block optional sites. For blocking banners and ads i use expressions 'ads|banner|banners|reclama …'.

    Once it's working, I'd also like to set:
      times - I'm OK with MySpace after hours and at lunchtime

    Use this way:

    • Default page –> Deny All (full blocking)
    • Create Time
    • Create ACL with time and define rules what do or not do at time and overtime
    • ACL's order-based. If you want define ACL 'For-All' and add 'VIP':
      -- you must move 'For-All' ACL at the last order (Source for example '10.0.0.0/24' you subnet)
      -- 'VIP' ACL (Source for example '10.0.0.25') move before 'For-All' ACL
      -- NOTE - you have Default '[x]All–-[x]deny'

    –-
    About Times:
    You can adding several items in one 'Time' rule. This is give any possible variant foor you need's.
    For example you want define time for Monday-Friday 8:00-18:00, exclude LunchTime (12:00-13:00). This possible with short ranges:
    Type    |Days|date|time
    [weekly][mon]–-[08:00-12:00]
    [weekly][mon]–-[13:00-18:00]
    [weekly][tue ]–-[08:00-12:00]
    [weekly][tue ]–-[13:00-18:00]
    [weekly][wed]–-[08:00-12:00]
    [weekly][wed]–-[13:00-18:00]
    [weekly][thu ]–-[08:00-12:00]
    [weekly][thu ]–-[13:00-18:00]
    [weekly][fri   ]–-[08:00-12:00]
    [weekly][fri   ]–-[13:00-18:00]

    All, what included in this ranges - uptime, and any other - overtime (excluded from ranges)

    PS Sorry for my english. I'm not resident this language.

    SquidGuardDoc EN  RU Tutorial
    Localization ru_PFSense

    1 Reply Last reply Reply Quote 0
    • W
      wompy
      last edited by Mar 21, 2008, 4:54 AM

      @Monoecus:

      I had for a long time similar problems with squidGuard like you. However, now it is working fine. My two cents:

      • Go exactly through the http://diskatel.narod.ru/sgquick.htm help.
      • Use the Shallalist
      • Then deny access to all, just to test.

      Now, if you browse the web, every page should be blocked.

      If this does not work, go to the shell and type 'more /var/squid/log'

      If you see some errors when loading the blacklist, like 'permission denied' or something you have to fix the permissions of the blacklist.

      In order to do that I just typed ' chown -R proxy:proxy /var/squidGuard' (This tip comes from http://meadvillelibrary.org/os/filtering/squidGuard-install.html)

      After that, everything worked fine.

      +1
      this helped alot. I was having the same problem that nothing was being blocked. I tried reinstalling squidguard and not uploading any blacklist. I set it to deny all and sure enough it worked. I then uploaded the suggested blacklist and it would not block anything. I followed your advice and checked the log and there were permission problems. To fix mine thought I also had to:
      chown -R proxy:proxy /var/db/squidGurad
      Now everything works perfectly.

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by Mar 21, 2008, 6:51 AM

        @wompy:

        I followed your advice and checked the log and there were permission problems. To fix mine thought I also had to:
        chown -R proxy:proxy /var/db/squidGurad
        Now everything works perfectly.

        Thanks, i testing this problem.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • H
          hinze57
          last edited by Mar 21, 2008, 12:50 PM

          I am not a programmer, but would like to help if I can. I have been using URLFilter <http: urlfilter.net="">which I have running on IPCOP and looking to see how difficult it'd be to port over to pfsense.  It is all CGI for the gui config interface.  I can send screen shots if you don't have IPCOP and are interested in seeing what has been done for URLFilter.  SquidGuard is an awesome pkg and addition to pfsense, just like to see it get better.  URLFilter has some automated grabbing of the BlackLists db's and lets you choose the BlackList db you wish as well.  The interface is pretty easy as well, however the pfsense SquidGuard pkg may have more capability.

          BTW, where are the php files for SquidGuard config pages?

          Thanks,
          KH</http:>

          1 Reply Last reply Reply Quote 0
          • D
            dvserg
            last edited by Mar 21, 2008, 2:43 PM

            I wanted rich-functional package. Easy interface in this situation non-functional  :-[

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • H
              hinze57
              last edited by Mar 21, 2008, 8:42 PM

              Don't misunderstand me, I think the package is awesome.  I'm almost ready to move it into production and replace IPCOP.  URLFilter has configuration parameters to pull the blacklist daily, weekly or monthly and apply it.  I have it running very late after hours so no to disrupt anything.  There is also a nice block page which shows client IP, site trying to connect to, and category which triggered the block.

              Is there a way to do the above with this SquidGuard package?

              Thank you,
              KH

              1 Reply Last reply Reply Quote 0
              • H
                hinze57
                last edited by Mar 21, 2008, 9:01 PM

                Okay, problem was with https. I now get a block page.

                Still trying to figure out how to automatically grab new blacklist file.  I can grab via cron, but what would be the commands to reconfigure just like if pressing upload button?

                KH

                1 Reply Last reply Reply Quote 0
                • D
                  dvserg
                  last edited by Mar 22, 2008, 4:05 PM Mar 22, 2008, 3:48 PM

                  @hinze57:

                  Okay, problem was with https. I now get a block page.

                  Still trying to figure out how to automatically grab new blacklist file.  I can grab via cron, but what would be the commands to reconfigure just like if pressing upload button?

                  KH

                  From GUI - nothig
                  You may use in you php script
                  php function from squidGuard.inc
                  sg_reconfigure_blacklist($url, $proxy);

                  You can create script and adding him to the cron.
                  …
                  require_once('squidguard.inc');
                  $url="URL";
                  sg_reconfigure_blacklist($url, '');
                  ...

                  squid & squidGuard will restart automaticly

                  There is also a nice block page which shows client IP, site trying to connect to, and category which triggered the block. 
                  Is there a way to do the above with this SquidGuard package?

                  Possible in HTTP webgui & Redirect mode= 'Internal'
                  GUI HTTPS - know problem and expected Redirect mode='External' with you self Error-page from external www server

                  Test
                  http://youpfSense/sgerror.php?url=403%20No%20access&a=10.0.0.0&n=MyClient&i=clientUser&s=clientgroup&t=porno/sex&u=http://porno.ru&

                  SquidGuardDoc EN  RU Tutorial
                  Localization ru_PFSense

                  1 Reply Last reply Reply Quote 0
                  • M
                    mwdiers
                    last edited by Mar 25, 2008, 3:30 PM

                    I just did a clean pfSense install last night, and managed to get squidGuard running. However, this was very difficult. I had many of the same problems noted here.

                    It was VERY touchy. Often squidGuard would say STOPPED. The only way to make it say STARTED was to upload the blacklist again. Then, if I changed ANY setting, the filter would stop working.

                    For example: I uploaded the blacklist. Clicked Save. I changed default destination to:```
                    !all

                    
                    I changed squidGuard to:```
                    !blk_BL_porn all
                    ```I clicked **Apply**. Now nothing was blocked. Porn and everything else was let through. I saw squid logging the website access. I saw no errors of any kind in the squidGuard or the squid logs.
                    
                    Very frustrating. I checked permissions. I tried changing /var/squidGuard to proxy:proxy (chmod -R proxy:proxy /var/squidGuard). No help.
                    
                    It was very slow downloading the blacklist over and over, so I fetched it to: /var/tmp/squidGuard/hold/shallalist.tar.gz and set that path for **Blacklist URL**. That way I could just click **Upload Url**, and the DB would be processed again.
                    
                    Everything works ONLY when I perform the following steps:
                    
                    1) Change filter settings.
                    2) **Apply**.
                    3) Click **Upload Url**.
                    4) Click **Apply**.
                    
                    In other words, the filter stops working every time I change a squidGuard setting. It works again if I re-process the database.
                    
                    As I said, there were never any error messages, so there is nothing I can send from the logs.
                    1 Reply Last reply Reply Quote 0
                    • W
                      wompy
                      last edited by Mar 25, 2008, 7:01 PM

                      I had similar problems to you, did you also change permissions to " /var/db/squidGurad" ? that is what finally fixed it for me.
                      see my previous post.

                      1 Reply Last reply Reply Quote 0
                      • D
                        dvserg
                        last edited by Mar 25, 2008, 8:31 PM

                        Thanks!
                        I fix bug with '/var/db/squidGuard' right's  in installation.
                        Pls test.

                        SquidGuardDoc EN  RU Tutorial
                        Localization ru_PFSense

                        1 Reply Last reply Reply Quote 0
                        • M
                          Monoecus
                          last edited by Apr 2, 2008, 8:02 AM

                          I have reinstalled pfSense yesterday and could thus test your fixes for the rights. Anything seems to be ok now.

                          Many thanks.

                          1 Reply Last reply Reply Quote 0
                          • H
                            hinze57
                            last edited by May 8, 2008, 1:52 AM

                            Is there a way to enable safe search?

                            1 Reply Last reply Reply Quote 0
                            • M
                              Monoecus
                              last edited by May 12, 2008, 8:54 PM

                              What do you mean by “safe search”?

                              1 Reply Last reply Reply Quote 0
                              • X
                                xhark
                                last edited by May 15, 2008, 1:32 PM

                                I have same problem, all is ok but nothing is filtered

                                SysNetAdmin & Blogger on http://blogmotion.fr

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dvserg
                                  last edited by May 15, 2008, 1:37 PM

                                  Renew package (today updated) and try now.

                                  SquidGuardDoc EN  RU Tutorial
                                  Localization ru_PFSense

                                  1 Reply Last reply Reply Quote 0
                                  • X
                                    xhark
                                    last edited by May 15, 2008, 1:43 PM

                                    I delete and reinstall ?

                                    SysNetAdmin & Blogger on http://blogmotion.fr

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      dvserg
                                      last edited by May 15, 2008, 1:46 PM

                                      @xhark:

                                      I delete and reinstall ?

                                      Hm.. Try full reinstall :D

                                      SquidGuardDoc EN  RU Tutorial
                                      Localization ru_PFSense

                                      1 Reply Last reply Reply Quote 0
                                      • X
                                        xhark
                                        last edited by May 15, 2008, 1:47 PM

                                        I talk about package ^^

                                        SysNetAdmin & Blogger on http://blogmotion.fr

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dvserg
                                          last edited by May 15, 2008, 1:49 PM

                                          @xhark:

                                          I talk about package ^^

                                          Yes. Reinstall package

                                          SquidGuardDoc EN  RU Tutorial
                                          Localization ru_PFSense

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]