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

    HTTP and HTTPs redirect to Dansguardian IP Address and Port

    Scheduled Pinned Locked Moved Cache/Proxy
    18 Posts 3 Posters 7.3k 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.
    • C
      chris4916
      last edited by

      I suggest that:

      • your web server serves proxy.pac file instead of wpad.pac file. it doesn't really matter at this stage but will help later  ;)
      • your pac file redirect to Squid port instead of Dansguardian port. (i.e. 3128 instead of 8080)

      The idea here is that browser relies on proxy which uses Dansguardian rather than having browser accessing directly Dansguardian, leaving Squid proxy unused.

      Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

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

        Chirs - I revised the pac code and save it as proxy.pac

        function FindProxyURL(url, host)
        { return "PROXY 172.16.255.254:3128; DIRECT"}

        Same result. Not working..  :'( (No logs on /var/squid/log/access.log)

        For IIS Web Server, I followed this instruction: http://findproxyforurl.com/deploying-pac/

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

          @dodong:

          Same result. Not working..  :'( (No logs on /var/squid/log/access.log)

          Aside lack of log, what is the behaviour client side ?

          what if you access directly http://172.16.0.1/proxy.pac from your browser ? can you read file content ?

          Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

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

            I corrected my code :

            function FindProxyForURL(url, host)
            { return "PROXY 172.16.255.254:3128; DIRECT"}

            On FF is working. However on IE no success..

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

              Finally, I've successfully configured on both IE11 and FF40. You just need to change the file extension from proxy.pac into proxy.dat

              function FindProxyForURL(url, host)
              { return "PROXY 172.16.255.254:3128; DIRECT"}.

              Chris, instead of using squid's port 3128, I've used dansguardian's port 8080.. In dansguardian config file you can set parent proxy to squid..

              Thanks to all!!

              Best,
              Dodong

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

                @dodong:

                Finally, I've successfully configured on both IE11 and FF40. You just need to change the file extension from proxy.pac into proxy.dat

                in the automatic discovery mode only, if I'm not wrong. When you hardcode URL, does it matter?

                Chris, instead of using squid's port 3128, I've used dansguardian's port 8080.. In dansguardian config file you can set parent proxy to squid..

                What's the purpose then ?

                Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

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

                  @chris4916:

                  @dodong:

                  Finally, I've successfully configured on both IE11 and FF40. You just need to change the file extension from proxy.pac into proxy.dat

                  in the automatic discovery mode only, if I'm not wrong. When you hardcode URL, does it matter?

                  Chris, instead of using squid's port 3128, I've used dansguardian's port 8080.. In dansguardian config file you can set parent proxy to squid..

                  What's the purpose then ?

                  Both Christ, automatic discovery mode and hardcode URL(http://findproxyforurl.com/deploying-pac/). My plan is to implement this on DCHP/DNS Server.

                  The purpose of setting up Dansguardian Port is to have content filtering..

                  By the way, many thanks Chris!!

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

                    BTW you're right: Dansguardian does act like Squidguard, as Squid redirector but Dansguardian is an additional layer between bowser and Squid  :-[

                    Pay attention to your file name:
                    some browser and applications will need proxy.pac while other will need .dat or even .da
                    The easiest way to achieve it still maintaining only one file is to create logical links (aliases)

                    Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

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

                      @chris4916:

                      BTW you're right: Dansguardian does act like Squidguard, as Squid redirector but Dansguardian is an additional layer between bowser and Squid  :-[

                      Pay attention to your file name:
                      some browser and applications will need proxy.pac while other will need .dat or even .da
                      The easiest way to achieve it still maintaining only one file is to create logical links (aliases)
                      [/quote]

                      Thanks for the reminder Chris! Do you have any "how-to" to do this?

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

                        As you operating system supporting proxy.pac file is Windows, you will have to create such symbolic links using mklink command and create as many logical links as needed.

                        e.g.

                        mklink wpad.dat proxy.pac
                        

                        will create a new (logical) file wpad.dat linked to proxy.pac
                        If you modify proxy.pac content, it will modify wpad.dat too.

                        Jah Olela Wembo: Les mots se muent en maux quand ils indisposent, agressent ou blessent.

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