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

    Squid + SquidGuard not reliable

    Scheduled Pinned Locked Moved Cache/Proxy
    22 Posts 6 Posters 2.4k 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.
    • M
      MrIT
      last edited by

      Just found out today: You can test WPAD when using Microsoft Edge (I suppose Chrome works as well?!) on Windows. If deployed and configured successfully, the you can open developer tools and switch to the "Network" tab. On all requests you'll see the proxy's IP adress as remote address for any website.

      1 Reply Last reply Reply Quote 0
      • JonathanLeeJ
        JonathanLee @michmoor
        last edited by

        @michmoor I have one i will share when I get home it's simple.

        Make sure to upvote

        M 1 Reply Last reply Reply Quote 0
        • M
          michmoor LAYER 8 Rebel Alliance @JonathanLee
          last edited by

          @jonathanlee said in Squid + SquidGuard not reliable:

          @michmoor I have one i will share when I get home it's simple.

          Thanks!
          Do you use a separate web server?

          Firewall: NetGate,Palo Alto-VM,Juniper SRX
          Routing: Juniper, Arista, Cisco
          Switching: Juniper, Arista, Cisco
          Wireless: Unifi, Aruba IAP
          JNCIP,CCNP Enterprise

          JonathanLeeJ 1 Reply Last reply Reply Quote 0
          • JonathanLeeJ
            JonathanLee @michmoor
            last edited by

            @michmoor no my WPAD script is inside the firewall. I followed the Netgate website for reference.

            Make sure to upvote

            1 Reply Last reply Reply Quote 0
            • JonathanLeeJ
              JonathanLee @michmoor
              last edited by JonathanLee

              @michmoor

              d22b6636-d327-4e55-a952-70b193be53b2-image.png

              (Image: files named wpad.da, wpad.dat, and proxy.pac are locally stored they are all part of wpad and contain the same script)

              b49df71d-618c-42c1-ba34-8bddbbf2c716-image.png

              (Image: Create and save text files as wpad.da, wpad.dat and proxy.pac)

              ec3e625b-a58c-4e01-a88a-4d55770d3b91-image.png

              (Image: Save all the WPAD files into path usr local www, this is so when any time port 80 is accessed it tells the system to use proxy)

              b3e4b1fc-2c66-4427-985a-1ea590bb9087-image.png

              (Image: All files should contain the following inside the text files wpad.da wpad.dat and proxy.pac this is the script)

              5eaa776e-568e-48e4-8eb8-7c93c94ec14c-image.png

              (Image: You must also add a DNS resolver for the name of the firewall mine is home arpa to link in the ip address of the firewall mine is 192 168
              1 1)

              a1a1ad37-3163-42f1-801d-8b69ce4ac03d-image.png
              (Image: DNS resolve after adding)

              ad3cd0de-c402-4141-95a3-94518c649885-image.png

              (Image: You must also create an ACL for the wpad anything that hits port 80 will auto configure to the port of the proxy. For me I have a lan group that is all of my devices on my lan Lan_group * any destination the firewall)

              537e6d5a-e79c-4325-9b52-c88130c3b851-image.png
              (Image: ACL "Access Control Close line up")

              022054d0-4af6-4561-8c46-22e65e5c1467-image.png
              (NAT)

              97ce06fc-38d4-43cb-88c3-b29630301196-image.png
              (ACL with port specific and mail server specific rules)
              5cec6acd-632c-4284-9e01-6b6074a21b28-image.png
              (Image: Alias used for mail acl)

              (Last three images explained: Manual NAT mine firewall approves mail and Xbox ports they are IP address specific; my mail ports also are blocked from accessing anything but the current dns resolved mail lists. remember recently when the FBI website had their mail server hacked and it was redirecting this is my idea of what a firewall could do to stop that type of hack)

              So if you really want to go crazy you can make manual entries for the NAT to be port specific also. Or just leave it auto configure.

              d7cbb98b-2568-4b7c-bb46-3121c812f233-image.png

              (Image: Squidguard Rules, make sure you add the loopback into the group acl and let it have access to redirectors as it redirects ports and needs to be able to do its job without Squidguard mistaking it.)

              5c76ce16-9e5a-4f43-a2e5-4834b285bc89-image.png

              (Image: Squid proxy SSL certificate issue, mark you do not validate if you want to use the Clam AV splash screens and you use an SSL certificate that was created with Squid and not the firewall.) This creates problems as the SSL is checked like a normal website so it will normally block the splash screen for some reason)

              601b8e0f-b1b8-4cf3-aff8-c2364889ba75-image.png

              (Image: Squid Proxy My Custom options, add your custom splice only rules I have Xbox, Amazon, Iphone) This means it will not SSL intercept only look at the get requests and headers for specific websites or devices, Amazon tablet if you have it to SSL intercept it will only work with the Silk browers for example, it needs splice to work with all the applications)

              d7e53063-6c50-4821-91dc-8e0455c85971-image.png

              (Image: Make a locally stored no bump text file for really picky websites, as well as ethical needs like banks and private messages. We are only looking for viruses and websites we do not use normally. By need only. Must use regex)

              856725e8-689a-455f-a3c9-231d2daf7459-image.png

              (Image: Now you can see Everything is working now and blocking viruses from Google cloud, SSL intercept and Splice at the same time)

              d0a037f8-ed5e-46fe-9493-b76d5e05d944-image.png

              (Image: Squid Proxy make sure you add the loopback into what can access the proxy, as the loopback needs to access clam av)

              a659e07f-e237-4ff4-a2fd-64ec53e33971-image.png
              (Image: Now my firewall runs the show, it protects everything the way it should. Notice the common name is my name, meaning the certificate for this ssl intercept is processed by the firewall)

              c192e5a3-39aa-43fe-8fa3-4f34f4386735-image.png
              (Image: Squid guard running like a champ and it can do url filtering on everything and virus checking on the URLS we do not normally see. notice https blocks)

              2eb9763b-1c83-4d84-bd6e-c9d54f63e5e0-image.png
              (Image: NAT port forwarding, make sure you use port forwarding for DNS and NTP so the firewall cannot be bypassed with a different DNS)

              687a0eb1-58e4-460d-9896-bb22ba92366c-image.png
              (Image: SSL Intercept and Splice working. So, when you need to bump SSL it works when you need to splice it does that. Best of both worlds.)

              PfSense and this community support team can make it work, just don't give up. Keep reading into it, you can even use the TAC support if you want to make a support ticket

              Make sure to upvote

              M 1 Reply Last reply Reply Quote 0
              • M
                michmoor LAYER 8 Rebel Alliance @JonathanLee
                last edited by

                @jonathanlee wow....Bravo..You got a great functioning Proxy there. Incredible. 1.For custom options, where did you get the syntax?
                2.Where did you get the sites that should be spliced(ignored)?
                3. Your certificate is loaded on client devices but what do you do with IoT?

                Seriously you did a great job here.

                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                Routing: Juniper, Arista, Cisco
                Switching: Juniper, Arista, Cisco
                Wireless: Unifi, Aruba IAP
                JNCIP,CCNP Enterprise

                JonathanLeeJ 1 Reply Last reply Reply Quote 0
                • JonathanLeeJ
                  JonathanLee @michmoor
                  last edited by JonathanLee

                  @michmoor

                  1. The custom options are from the Squid website and the regex is used. Some was nice enough to share their no bump file with me, so I made my own with all my own websites that I need to not bump. I think Squid content accelerator software runs a large amount of the internet. I would love to learn more about it. let me know if you have any tips for me.
                  2. Every device I own have a certificate installed on them for this to work. Xbox does not have a certificate only uses WPAD that was the most confusing one for me. I only wanted to filter http get requests to block specific web URLS with that and it works.

                  Make sure to upvote

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    michmoor LAYER 8 Rebel Alliance @JonathanLee
                    last edited by

                    @jonathanlee I really would like to keep in touch with you. This was a great write up you gave here. The documentation is a bit sparse in getting the interception to work but your screenshots are solid.

                    Firewall: NetGate,Palo Alto-VM,Juniper SRX
                    Routing: Juniper, Arista, Cisco
                    Switching: Juniper, Arista, Cisco
                    Wireless: Unifi, Aruba IAP
                    JNCIP,CCNP Enterprise

                    JonathanLeeJ 2 Replies Last reply Reply Quote 1
                    • JonathanLeeJ
                      JonathanLee @michmoor
                      last edited by

                      @michmoor thanks, it's amazing, I wish I understood more about the code. I did purchase an official version of the Netgate firewall. So, this was not the free version.

                      Make sure to upvote

                      1 Reply Last reply Reply Quote 0
                      • JonathanLeeJ
                        JonathanLee @michmoor
                        last edited by JonathanLee

                        @michmoor Thanks,

                        I sometimes have issues with the splash screen as it gets mixed up with the SSL certificate of the proxy over the pfSense at times,

                        b0edd609-ed30-4902-9224-4fd61c8e725b-image.png
                        (Image: Squid stopped a https virus before it got to my system, with splashscreen)

                        It does work good it's just you have to accept remote ssl with errors to make it CLAM AV work, I wish it would auto accept the SSL of the Squid and remote check the others. That is my main issue right now finding a way to make it say ignore the splashscreen SSL cert and go ahead and check the others. The Splashscreen SSL is an SSL that was made with open ssl inside of Squid proxy)

                        (NOTE: You must use the SSL certificate that is issued from SQUID proxy via command line and import it into the firewall, not the other way arround, I could never get it to work via the firewall into the proxy)

                        Meaning Squid is the CA "Certificate authority" And that certificate is used by Pfsense as an imported certificate.

                        I am going to test the upstream proxy certificate and set it to the pfsense certificate and see if that helps.

                        Make sure to upvote

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          michmoor LAYER 8 Rebel Alliance @JonathanLee
                          last edited by

                          @jonathanlee Hey Jon. Wanted to follow up here. I got WPAD working with the help of an Apache server. Took about 1hr of googling as im not a sysadmin but its working flawlessly.
                          During this process i discovered that SquidGuard does not work well with Transparent mode. This is the need for WPAD comes into play.
                          Really grateful for your help here.

                          Firewall: NetGate,Palo Alto-VM,Juniper SRX
                          Routing: Juniper, Arista, Cisco
                          Switching: Juniper, Arista, Cisco
                          Wireless: Unifi, Aruba IAP
                          JNCIP,CCNP Enterprise

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