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

[solved] squidguard safesearch / rewrite dosent work

Scheduled Pinned Locked Moved Cache/Proxy
8 Posts 4 Posters 6.6k Views 1 Watching
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.
  • G Offline
    gad_d
    last edited by Feb 19, 2016, 9:30 AM Feb 3, 2016, 3:15 PM

    Hi,
    I'm trying pfsense for several days now and find it impossible to have safe-search enforced
    I'm using squidguard

    Tried using the blacklist "safesearch" of http://www.shallalist.de/Downloads/shallalist.tar.gz

    rew safesearch {
    s@(google../search?.q=.)@&safe=active@i
    s@(google..
    /images.q=.)@&safe=active@i
    s@(google../groups.q=.)@&safe=active@i
    s@(google..
    /news.q=.)@&safe=active@i
    s@(yandex../yandsearch?.text=.)@&fyandex=1@i
    s@(search.yahoo..
    /search.p=.)@&vm=r&v=1@i
    s@(search.live../.q=.)@&adlt=strict@i
    s@(search.msn..
    /.q=.)@&adlt=strict@i
    s@(.bing..*/.q=.)@&adlt=strict@i
    log block.log
    }

    And tried configuring rewrite rules by my self according to what i found in various forums

    rew My-List {
    s@(.*youtube.com/.v=.)@&&safety_mode=true@i
    s@(.google../.q=.)@&&safe=strict%26@i
    s@(.duckduckgo.com.)@&&kp=1@i
    s@(.*bing.com/.q=.)@&&adlt=strict%26@i
    }

    only duckduckgo was enforced, the rest didnot

    any suggestions ?

    1 Reply Last reply Reply Quote 0
    • C Offline
      C0RR0SIVE
      last edited by Feb 16, 2016, 8:34 PM

      As far as the Google Safe Search, you will need to create a DNS entry in your DNS Forwarder to force a safesearch.

      But youtube, bing, yahoo, and several others have changed how they do content filter, and use a local cookie (not sure how it would be possible to enforce a safe search, ever now)… The other problem is, with most websites being HTTPS, unless you are using a MITM attack to force HTTPS through SQUID, the SquidGuard settings will never apply.

      TBH, I would set Bing, Yahoo, and pretty much all other search engines, to use the forced google safe search... Might upset your users, but, not much you can do anymore.
      https://support.google.com/websearch/answer/186669?hl=en

      1 Reply Last reply Reply Quote 0
      • G Offline
        gad_d
        last edited by Feb 18, 2016, 9:21 PM

        thanks for the suggestion, i actually used the DNS option and its working both for Google and Youtube

        the rewriter method seem to work partially in a weird way - i see it in firefox only - when i search something, then browse to another page and then coming back to the search page (using back button) i see that the URL is containing the rewrite strings and if i refresh the page it switch to safesearch mode…

        1 Reply Last reply Reply Quote 0
        • C Offline
          C0RR0SIVE
          last edited by Feb 18, 2016, 10:47 PM

          How did you get youtube to work properly with the safesearch?  That is something I have been wanting to do, but, haven't had luck with as far as I can tell… How does one even test that it works?  (Still learning a good bit along with everyone else)

          1 Reply Last reply Reply Quote 0
          • C Offline
            cwagz
            last edited by Feb 19, 2016, 5:21 AM

            I had to set the "URI Whitespace Characters Handling" in Squid Settings to "chop" in order to get the Safesearch rewrite feature to function properly.

            Chad

            Netgate 6100 MAX

            1 Reply Last reply Reply Quote 0
            • G Offline
              gad_d
              last edited by Feb 19, 2016, 7:58 AM

              @cwagz:

              I had to set the "URI Whitespace Characters Handling" in Squid Settings to "chop" in order to get the Safesearch rewrite feature to function properly.

              Chad

              Changing URI setting seem to solve it - Thanks a lot ! :)

              This is the list I have the works for me

              rew My-List {
              s@(.youtube.com.)@&&safety_mode=true@i
              s@(.google../.q=.)@&&safe=active@i
              s@(.duckduckgo.com.)@&&kp=1@i
              s@(.bing.com.)@&&adlt=strict@i
              s@(.search.yahoo.com.)@&&vm=r@i
              s@(.yandex.com/.)@&&fyandex=1@i
              }

              As for Youtube safesearch, i have similar DNS ocnfiguration (see attachments)

              safesearch.PNG
              safesearch.PNG_thumb
              google-dnsforwarder.PNG
              google-dnsforwarder.PNG_thumb
              google-dnsforwarder-edit.PNG
              google-dnsforwarder-edit.PNG_thumb

              1 Reply Last reply Reply Quote 0
              • G Offline
                gad_d
                last edited by Feb 19, 2016, 9:37 AM

                @C0RR0SIVE:

                How did you get youtube to work properly with the safesearch?  That is something I have been wanting to do, but, haven't had luck with as far as I can tell… How does one even test that it works?  (Still learning a good bit along with everyone else)

                see my last post on how to setup dns safesearch for youtube
                and as for how to check it … i tried searching "sex" and compared the results. its not perfect, but will settle  for what they offer

                4 1 Reply Last reply Jul 28, 2019, 6:30 AM Reply Quote 0
                • 4 Offline
                  4o4rh @gad_d
                  last edited by Jul 28, 2019, 6:30 AM

                  This post is deleted!
                  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