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

    Guide to configure squid, squidguard, https?

    Scheduled Pinned Locked Moved pfSense Packages
    38 Posts 10 Posters 9.0k 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.
    • T
      thecableguy
      last edited by

      Thanks for all the suggestions… I will look around for a good guide for WPAD configuration.

      :)

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        I gave you the link for one in my previous post  ;D

        1 Reply Last reply Reply Quote 0
        • T
          thecableguy
          last edited by

          @KOM:

          I gave you the link for one in my previous post  ;D

          Thanks, I did see that however I am not an expert like yourself  ;), I was looking for a comprehensive guide from A to Z to configure WPAD..

          Is this guide correct? :

          http://irj972.co.uk/articles/pfSense-WPAD-PAC-configuration

          Thanks

          1 Reply Last reply Reply Quote 0
          • KOMK
            KOM
            last edited by

            The guide I linked to was much easier for me to understand (I just did this whole exercise two weeks ago!) than the one you provided.  Really, it's a lot easier than you think:

            1.  Login to pfSense via SSH and go to /usr/local/www
            2.  Create wpad.dat and stuff it with:

            function FindProxyForURL(url,host)
            {
            return "PROXY Your.Proxy.IP.Address:3128";
            }

            3.  Copy wpad.dat to wpad.da and proxy.pac to support other auto-discovery methods
            4.  Create a DNS entry for wpad and point it to your pfSense LAN IP
            5.  Create a DHCP Option 252 entry and point it to your pfSense WPAD URL: http://Your_pfSense_LAN_IP:Port/wpad.dat
            6.  Add LAN rules that block port 80 and port 43

            Done.

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

              Only problem with that setup, pfSense should be using port 443 for the WebGUI which means port 80 isn't listening anymore.  I've had look results adding v-host and dropping the wpad files into that folder for hosting.

              1 Reply Last reply Reply Quote 0
              • KOMK
                KOM
                last edited by

                pfSense should be using port 443 for the WebGUI which means port 80 isn't listening anymore

                And yet it works.  It probably listens on both but only serves on the specified port.

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

                  @KOM:

                  pfSense should be using port 443 for the WebGUI which means port 80 isn't listening anymore

                  And yet it works.  It probably listens on both but only serves on the specified port.

                  Port 80 is closed when I enabled https and is free for another process to use.

                  1 Reply Last reply Reply Quote 0
                  • KOMK
                    KOM
                    last edited by

                    Actually, I'm a moron.  While my test 2.2 box is HTTPS, my 2.1.5 box is HTTP.  Yes, if you have WebGUI set for HTTPS then you will need another web server to host the WPAD files.

                    1 Reply Last reply Reply Quote 0
                    • cwagzC
                      cwagz
                      last edited by

                      Couple of questions:

                      So if I put the wpad.dat files on a virtual webserver on my network I could leave pfsense GUI on 443?

                      and

                      If Squid is used in normal mode does it filter HTTPS without having to do the man in the middle thing?  I am trying to decide how to protect my kids as well…

                      Thanks
                      Chad

                      Netgate 6100 MAX

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        Chad,  if wpad stays out of pfsense box(or at least out of default web server)  you can leave it 443.

                        While using active proxy,  you can filter https sites but not https urls without ssl interception.

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • cwagzC
                          cwagz
                          last edited by

                          Thanks marcelloc,

                          I have gotten my setup working with wpad and was pretty happy but then found that minecraft would not use the proxy and failed to launch. I then setup a transparent proxy and everything works good but of course the kids can bypass the filter by going https. I then got https filtering working in transparent mode only to find that Minecraft won't buy my CA and therefore won't download it's package from Amazon.

                          Is there a way to have traffic out to a specic website not go through the ssl interception?
                          Anyone have a good solution?

                          Chad

                          Netgate 6100 MAX

                          1 Reply Last reply Reply Quote 0
                          • KOMK
                            KOM
                            last edited by

                            When you have your proxy in standard mode (non-transparent), you typically use firewall rules to block access from LAN to ports 80 and 443.  In your case, you want to add a rule above the block rule that specifically allows your Minecraft box to talk on 80/443 or whatever Minecraft uses for its updates.

                            1 Reply Last reply Reply Quote 0
                            • marcellocM
                              marcelloc
                              last edited by

                              While using transparent proxy,  create a host alias with  hosts/ips (not domains)  you want to bypass the transparent proxy  and then put this alias on squid general tab(bypass proxy to these Destination ips).

                              Treinamentos de Elite: http://sys-squad.com

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • cwagzC
                                cwagz
                                last edited by

                                I thought i tried putting s3.amazonaws.com in the bypass proxy to these destinations without affect.  Is this the right format for the host alias?

                                The problem with the firewall rule for standard mode is I would end up bypassing all of my kids computers from being forced through the proxy.  I did find something about launching minecraft via a shortcut to define the proxy so I may go back to trying standard mode if i cannot get the launcher to work with ssl interception.  So far I have installed my cert on all of our phones and machines and the transparent proxy is working really well.  It just seems to be minecraft that is causing problems.

                                Thanks for the help.

                                Netgate 6100 MAX

                                1 Reply Last reply Reply Quote 0
                                • J
                                  Jambro1964
                                  last edited by

                                  I used GPO to push the cert to all domain computers, the pain was all the BYODs and had to manually import the cert. I just stuck it on the internal webserver and gave all instructions to get to it and import it. Wasn't that bad.

                                  My problem now is that Squid has problems with https sites that are using TLS 1.2.  Any one know how to fix that in the Squid-dev so I can continue to use MitM?

                                  Thanks,

                                  Jim

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    thecableguy
                                    last edited by

                                    @KOM:

                                    The guide I linked to was much easier for me to understand (I just did this whole exercise two weeks ago!) than the one you provided.  Really, it's a lot easier than you think:

                                    1.  Login to pfSense via SSH and go to /usr/local/www
                                    2.  Create wpad.dat and stuff it with:

                                    function FindProxyForURL(url,host)
                                    {
                                    return "PROXY Your.Proxy.IP.Address:3128";
                                    }

                                    3.  Copy wpad.dat to wpad.da and proxy.pac to support other auto-discovery methods
                                    4.  Create a DNS entry for wpad and point it to your pfSense LAN IP
                                    5.  Create a DHCP Option 252 entry and point it to your pfSense WPAD URL: http://Your_pfSense_LAN_IP:Port/wpad.dat
                                    6.  Add LAN rules that block port 80 and port 43

                                    Done.

                                    I understand this however, is there a step by step guide? I am still learning BSD and Linux and don't want to make any mistakes..

                                    Thanks

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      KOM steps are a step by step guide.  The dhcp stuff you can configure on your active directory (Windows)  but you will also find good guides looking for wpad + dhcp configuration on forum, Google and/or youtube.

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • cwagzC
                                        cwagz
                                        last edited by

                                        @marcelloc:

                                        While using transparent proxy,  create a host alias with  hosts/ips (not domains)  you want to bypass the transparent proxy  and then put this alias on squid general tab(bypass proxy to these Destination ips).

                                        I tried this again and realized I was missing a required host.  It works!  Minecraft needs the following bypassed:
                                        s3.amazonaws.com
                                        authserver.mojang.com

                                        Thanks again

                                        Netgate 6100 MAX

                                        1 Reply Last reply Reply Quote 0
                                        • marcellocM
                                          marcelloc
                                          last edited by

                                          The real time tab is really useful for these diagnostics  :)

                                          Treinamentos de Elite: http://sys-squad.com

                                          Help a community developer! ;D

                                          1 Reply Last reply Reply Quote 0
                                          • cwagzC
                                            cwagz
                                            last edited by

                                            Maybe this will help some for thecableguy.  From KOM guide which I followed:

                                            I put my wpad.dat on a virtual machine running ubuntu but the same stuff works in pfsense i believe.  There are a lot of blogs and posts that show how to use this stuff as well.

                                            1.  Login to pfSense via SSH and go to /usr/local/www
                                            I use Putty on windows to do this.  You have to turn SSH access on in pfsense

                                            2.  Create wpad.dat and stuff it with:
                                            you can also do this from inside pfsense using the "edit file" page
                                            or cd to the directory above and then use nano to create the file (hopefully nano is included in pfsense otherwise google how to use vi)

                                            #nano wpad.dat

                                            function FindProxyForURL(url,host)
                                            {
                                            return "PROXY Your.Proxy.IP.Address:3128";
                                            }

                                            3.  Copy wpad.dat to wpad.da and proxy.pac to support other auto-discovery methods
                                            #cp wpad.dat wpad.da
                                            #cp wpad.dat proxy.pac

                                            4.  Create a DNS entry for wpad and point it to your pfSense LAN IP

                                            5.  Create a DHCP Option 252 entry and point it to your pfSense WPAD URL: http://Your_pfSense_LAN_IP:Port/wpad.dat

                                            6.  Add LAN rules that block port 80 and port 43

                                            Done.

                                            Netgate 6100 MAX

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