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

    Guide to filtering web content (http and https) with pfsense 2.3

    Scheduled Pinned Locked Moved Documentation
    190 Posts 54 Posters 223.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.
    • A
      aGeekhere
      last edited by

      That means, I don't need to redirect traffic from port 80 to 3128 and 443 to 3129 right

      That is what the transparent proxy is doing, remove that rule, that could be what is causing the issue.

      Never Fear, A Geek is Here!

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

        @aGeekHere:

        That means, I don't need to redirect traffic from port 80 to 3128 and 443 to 3129 right

        That is what the transparent proxy is doing, remove that rule, that could be what is causing the issue.

        Alright

        So what I have now on my firewall rules are:
        1. antilock rule on port 80 which says (allow all on tcp port 80)
        2. block LAN_NET on tcp port 80 and 443
        3. redirect rule for dns resolution

        would that be ok ?

        On the other hand, what is the default cannot access page of the web browser, is it the same like of that of http transparent proxy error page ?

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

          aGeekHere,

          My wpad now works.  I can download it from chrome browser.
          I can ping and nslookup wpad now.
          All squidguard group ACL and its target rules are applied to block facebook and youtube for testing purposes for now.
          I HAVE NOT INSTALLED THE CA CERT ON CLIENT DEVICES.

          I used http and https filtering with splice all option so that I dont need to install the cert to client devices.

          I also cleared browser cache and history.

          The result is I can browse http but cannot browse https.  Https sites like yahoo and google mail works though.

          I have screenshot of the error for browsing https site.

          error.jpg
          error.jpg_thumb

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

            Is squidguard blocking it by mistake? is it set to deny all?

            Try allowing all in squidguard rules to test.

            Post screen shots of squidguard.

            Try clearing states in pfsense.

            Reboot.

            Never Fear, A Geek is Here!

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

              Squidguard is not blocking by mistake.

              I tried clearing firewall states and Rebooted, still the same situation.

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

                I also have this wireshark done where I can see that it made a CONNECT method to facebook, then it has established connection, send client hello but later have RST and there is no SERVER HELLO thus no application data received.

                What could I miss here.

                Untitled.jpg
                Untitled.jpg_thumb

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

                  lets try without the wpad and use just the transparent, set proxy direct does it work then?
                  If you still cannot access https sites then post you squid config.

                  Never Fear, A Geek is Here!

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

                    @aGeekHere:

                    lets try without the wpad and use just the transparent, set proxy direct does it work then?
                    If you still cannot access https sites then post you squid config.

                    If I use only the http proxy without the ssl mitm and set browser to auto, then the http proxy filter works.

                    If you are saying to setup http transparent proxy and ssl mitm filtering and install cert to client device and set browser proxy, then I have not done this yet.

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

                      and install cert to client device and set browser proxy, then I have not done this yet.

                      Just use splice all for mitm (and use the cert created in pfsense under SSL Man In the Middle Filtering\CA). 
                      Set browser to direct.
                      This will use transparent proxy for both http and https.

                      If this works then there is an issue with your WPAD.
                      If this does not work then something is broken.

                      Never Fear, A Geek is Here!

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

                        @aGeekHere:

                        and install cert to client device and set browser proxy, then I have not done this yet.

                        Just use splice all for mitm (and use the cert created in pfsense under SSL Man In the Middle Filtering\CA). 
                        Set browser to direct.
                        This will use transparent proxy for both http and https.

                        If this works then there is an issue with your WPAD.
                        If this does not work then something is broken.

                        What do you mean for "Set browser to direct", is this the automatic detect settings ?

                        On the other hand, my wpad only have the following inside:

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

                        I am not sure what you example below means so I use the example from pfsense wiki.

                        function FindProxyForURL(url, host)
                        {
                            if (isPlainHostName(host) ||
                                shExpMatch(host, "*.local") ||
                                isInNet(dnsResolve(host), "192.168.1.0",  "255.255.255.0"))
                                return "DIRECT";

                        return "PROXY 192.168.1.1:3128";
                        }

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

                          yeah turn off automatic detect setting so the traffic goes direct and gets intercepted by the transparent proxy.

                          Never Fear, A Geek is Here!

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

                            @aGeekHere:

                            yeah turn off automatic detect setting so the traffic goes direct and gets intercepted by the transparent proxy.

                            By turn off, you mean uncheck the automatic detect settings and others options as well ?

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

                              yes

                              Never Fear, A Geek is Here!

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

                                May I ask though, what is the exact version of pfsense that you are using just for comparison.  If this will not work, then I will need to reinstall my pfsense box, maybe its broken.

                                I am using:

                                2.3.4-RELEASE (amd64)
                                built on Wed May 03 15:13:29 CDT 2017
                                FreeBSD 10.3-RELEASE-p19

                                On the other hand, below is the screen shot of my testing NOT USING WPAD but setup the browser proxy.

                                Also, I tried direct approach that you said, and the result the same error as before.

                                What exact pfsense version are you using ?

                                error1.jpg_thumb
                                error1.jpg

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

                                  2.3.4-RELEASE (amd64)
                                  Something is broken.

                                  Never Fear, A Geek is Here!

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

                                    @aGeekHere:

                                    2.3.4-RELEASE (amd64)
                                    Something is broken.

                                    what is in your wpad file?

                                    did you install your pfsense or upgraded to 2.3.4 release?

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

                                      wpad is in the guide.

                                      I have been upgrading since i joined.

                                      Never Fear, A Geek is Here!

                                      1 Reply Last reply Reply Quote 0
                                      • 4
                                        4Qman
                                        last edited by

                                        Hi,

                                        I am new to pfsense, can someone have a look at the attached image and tell me if it looks correct please.

                                        ![pfsense Nat PortForward 1.png](/public/imported_attachments/1/pfsense Nat PortForward 1.png)
                                        ![pfsense Nat PortForward 1.png_thumb](/public/imported_attachments/1/pfsense Nat PortForward 1.png_thumb)

                                        1 Reply Last reply Reply Quote 0
                                        • 4
                                          4Qman
                                          last edited by

                                          I have followed this guide.

                                          When I run proxy test it shows that I am under proxy. Google works fine, and so do most websites. But such websites as Amazon won't load, gives error.

                                          Any advice would be greatly appreciated.

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

                                            Post your squid config. Are you using just WPAD or Transparent proxy with mitm (cert of all devices) or Transparent proxy mitm set to splice all?

                                            The best setup i found to use is WPAD and transparent proxy with mitm splice all, set devices to auto config.

                                            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.