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

    SquidGuard Redirector

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 2.2k 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.
    • G
      Gob
      last edited by

      Hi
      I am testing pfS 1.2 with a view to migrating over from IPcops. One feature we use a lot is URL Filter on the IPcop so I am trying to get the same functionality configured with pfS and SquidGuard.

      I would like a redirector to an .asp page on an external web server but also passing the client IP, group  and requested URL in the Query String (or as a POST).
      In the Default Redirect field I have tried every possible combination I can think of (over the past 5 hours!) but I can only pass one variable to the redirected page.

      If I enter the following in the redirector field:
      http://webserver.mydomain.com/accessdenied.asp?group=%t&caddr=%i

      I only get the first parameter after the ?

      Looking in squidGuard.conf, the following is generated:
      redirect http://10.0.2.1/sgerror.php?url=http://webserver.mydomain.com/accessdenied.asp?group=%t&caddr=%i&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u

      It appears to be appending the parameters automatically at the end of the url, so I tried omitting them from the redirector field in the web GUI. This then gives:

      redirect http://10.0.2.1/sgerror.php?url=http://webserver.mydomain.com/accessdenied.asp&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u

      My browser expects to see a '?' in the URL to denote the start of the query string parameters not an '&' so consequently none of the parameters are passed!

      Can anyone help?
      This is driving me nuts!

      Thanks
      Gordon

      If I fix one more thing than I break in a day, it's a good day!

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        Set 'Redirect mode' field as 'External …' (General page) and use you own block page URL.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • G
          Gob
          last edited by

          Doh!
          That worked.

          Many thanks
          Gordon

          If I fix one more thing than I break in a day, it's a good day!

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