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

    How to enter these redirects in Squidguard

    Scheduled Pinned Locked Moved Cache/Proxy
    7 Posts 3 Posters 2.6k 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.
    • 4
      4o4rh
      last edited by

      I read in another post, this is how to perform redirects for the likes of duckduck go

      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
      }

      So far i have google, bing and youtube safe mode working via dns redirects.

      I currently need to get duckduckgo, yandex and yahoo working.

      I do i enter the above in 2.4.4

      1 Reply Last reply Reply Quote 0
      • H
        Harrybells
        last edited by

        Squid is a proxy server, HTTP requests are sent to Squid instead of being sent directly to the internet.

        SquidGuard is a web filter plugin for Squid which is used to restrict access to domains/URLs based upon access control lists. When SquidGuard receives a request it is examined and will either allow the page to load or will redirect to a predetermined “block” page or script. SquidGuard makes its decisions based upon the use of access control lists and databases of domains, URLs, and expressions.

        4 1 Reply Last reply Reply Quote 0
        • 4
          4o4rh @Harrybells
          last edited by

          @Harrybells i think you misunderstood the question. i am not asking on what it does, i am asking how to enter the redirection code from the config file, into the pfsense user interface.

          My-List {
          s@(.youtube.com.)@&&safety_mode=true@i
          }

          The above code, is redirection code that is entered via the config file when not using pfsense (as i understand it), i want to know how to enter this rule into the pfsense interface which has under the rewrite rule option
          Target URL, replace URL, Opt - no case, redirect. etc

          i tried the doing a redirect for duckduckgo for example, and it doesn't work.

          1 Reply Last reply Reply Quote 0
          • A
            aGeekhere
            last edited by

            I did that in the web filtering guide, have a read at that part.

            https://forum.netgate.com/topic/100342/guide-to-filtering-web-content-http-and-https-with-pfsense-2-3/178

            Never Fear, A Geek is Here!

            4 2 Replies Last reply Reply Quote 0
            • 4
              4o4rh @aGeekhere
              last edited by

              @aGeekhere I setup according to your guide/s and almost all is working.
              Specifically, i need to get duckduckgo safe search working.

              I found on a forum, these are the rules that go in the squid config file to force redirects

              My-List {
              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
              }

              My question is, how to enter these rules via the squidguard proxy interface in pfsense where you have 3 fields: -

              Rewrite Rule: Target URL or regular expression
              Rewrite Rule: Replace to URL
              Rewrite Rule: Opt. nocase / redirect / nocase + redirect

              Note:
              Rewrite rule: Define how the URL will be replaced.
              Target URL or Regular Expression: Contains destination URL or regular expression. This is the URL or RegEx the user wants to visit.
              Replace to URL: Contains the replacing URL. This is the URL the user will see instead the original one
              .

              I have tried but can't get the config to work.

              1 Reply Last reply Reply Quote 0
              • 4
                4o4rh @aGeekhere
                last edited by 4o4rh

                @aGeekhere
                It appears that squidguard is blocking content as desired

                xhamster.com:443	Request(default/blk_BL_porn/-) - CONNECT REDIRECT
                

                But the blocking, gives the following Error code: SSL_ERROR_RX_RECORD_TOO_LONG

                Is it possible to have an error page, that says the sight is prohibited, rather than to confuse with an error that maybe generated under other circumstances?

                1 Reply Last reply Reply Quote 0
                • A
                  aGeekhere
                  last edited by

                  not for https sites as far as i know. does duckduckgo have a dns safe mode?

                  Never Fear, A Geek is Here!

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