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

    Squid 3.4.9 no traffic in transparent mode.

    Scheduled Pinned Locked Moved Cache/Proxy
    54 Posts 15 Posters 32.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.
    • E
      Escorpiom
      last edited by

      This has me going all night.

      Just updated from Squid dev 3.3 to Squid 3.4.9, update went smooth, no errors.
      Squid starts ok, but only works when leaving it as "non-transparent" and pointing the browser to port 3128 on the server.
      I can see the access logs getting populated, and there are no errors in Squid's cache log.

      But as soon as I check the "transparent proxy" check box, browsing stops and I get errors like "Empty reply" or "No socket".
      It seems that there is a problem with the automatically created rules in the firewall part, better said I suspect they are not being created.
      The firewall doesn't log anything strange, blocked or otherwise.

      Are there any steps I can take to troubleshoot this issue?     
      PfSense is at the latest RC.

      Cheers.

      1 Reply Last reply Reply Quote 0
      • E
        Escorpiom
        last edited by

        Is there something that I can do to troubleshoot this?
        Can the hidden firewall rules be viewed in any form?

        Cheers.

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

          SSH in and run:

          pfctl -sr

          1 Reply Last reply Reply Quote 0
          • E
            Escorpiom
            last edited by

            Thank you for your help KOM, I ran the command before enabling transparent proxy and after.
            After enabling the transparent proxy, rules are being created:

            pass in quick on igb0_vlan32 proto tcp from any to ! (igb0_vlan32) port = http flags S/SA keep state
            pass in quick on igb1 proto tcp from any to ! (igb1) port = http flags S/SA keep state
            pass in quick on igb0_vlan60 proto tcp from any to ! (igb0_vlan60) port = http flags S/SA keep state
            pass in quick on igb0_vlan31 proto tcp from any to ! (igb0_vlan31) port = http flags S/SA keep state
            pass in quick on igb0_vlan33 proto tcp from any to ! (igb0_vlan33) port = http flags S/SA keep state
            pass in quick on igb0_vlan10 proto tcp from any to ! (igb0_vlan10) port = http flags S/SA keep state
            pass in quick on igb0_vlan20 proto tcp from any to ! (igb0_vlan20) port = http flags S/SA keep state
            pass in quick on igb0_vlan40 proto tcp from any to ! (igb0_vlan40) port = http flags S/SA keep state
            pass in quick on igb0_vlan50 proto tcp from any to ! (igb0_vlan50) port = http flags S/SA keep state
            pass in quick on igb0_vlan32 proto tcp from any to ! (igb0_vlan32) port = 3128 flags S/SA keep state
            pass in quick on igb1 proto tcp from any to ! (igb1) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan60 proto tcp from any to ! (igb0_vlan60) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan31 proto tcp from any to ! (igb0_vlan31) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan33 proto tcp from any to ! (igb0_vlan33) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan10 proto tcp from any to ! (igb0_vlan10) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan20 proto tcp from any to ! (igb0_vlan20) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan40 proto tcp from any to ! (igb0_vlan40) port = 3128 flags S/SA keep state
            pass in quick on igb0_vlan50 proto tcp from any to ! (igb0_vlan50) port = 3128 flags S/SA keep state
            

            But, browsing is still not possible when transparent proxy enabled. Only https loads fine, because it doesn't go through the proxy.
            HTTP traffic shows "empty reply" or "no socket" so it seems to be a Squid issue after all.
            Could I have overlooked something?
            I have Squid binding to all vlan interfaces. Not to localhost (didn't work).

            Edit:
            This is what Squid's realtime monitor shows on the GUI:

            12.12.2014 16:00:01	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 16:00:01	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 16:00:00	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 16:00:00	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 15:59:59	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 15:59:59	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 15:59:59	192.168.10.5	TAG_NONE/400	/pulse?authon&user=F127E5691F260DA87C2C31E30EE741ED&url_heartbeat=1,0,9,9,0&db_conn=1,0,0,0,0	-	-
            12.12.2014 15:59:57	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            12.12.2014 15:59:57	192.168.10.4	TAG_NONE/400	/squid_monitor_data.php	-	-
            

            Cheers.

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

              Maybe you should post your Services - Proxy server - General screenshot.  You have validated all your settings to make sure the upgrade didn't reset them?

              1 Reply Last reply Reply Quote 0
              • E
                Escorpiom
                last edited by

                The only two events that could have caused the issue are:

                • Squid 3.3-dev was installed and when upgrading to 3.4.9 I didn't uninstall the old package. My impression was it would just replace 3.3 dev, but
                  it turned out that they got installed BOTH.
                  I since uninstalled both versions and installed only 3.4.9, but the issue remains.

                • I had previously applied a workaround to get Squid 3.3 dev working, copying some files. There may be some leftovers, but I could not find them.
                  This was the previous fix:

                cd /usr/pbi/squid-amd64/
                cp -r ./local/* /usr/local/
                rm -rf ./local
                ln -s /usr/local ./local
                sync
                squid
                

                Here are the settings on Squid General, note that transparent proxy is disabled at the moment, ssl filtering is disabled also.

                Cheers.

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

                  Settings look good.  I've seen cases where after uninstalling squid, you had to shell in and manually rm -r /var/squid, but I don't remember exactly and I can't check at the moment.

                  1 Reply Last reply Reply Quote 0
                  • E
                    Escorpiom
                    last edited by

                    I've just totally cleared out all Squid traces, installed Suid 3.4.9.
                    Created one symlink to get rid of mime.cfg error, and Squid started.

                    Still no browsing in transparent mode, browser returned: ERR_SOCKET_NOT_CONNECTED.
                    Perhaps there is an old redirect to Squidguard and that's why it wont't load pages.
                    Just guessing, I'm out of options.

                    Cheers.

                    1 Reply Last reply Reply Quote 0
                    • F
                      firstzerg
                      last edited by

                      I have same problem
                      "squid -v" give configure options. In they are present:
                      '–disable-ipf-transparent' '--disable-ipfw-transparent' '--disable-pf-transparent'
                      Can this explain problem?

                      1 Reply Last reply Reply Quote 0
                      • E
                        Escorpiom
                        last edited by

                        @firstzerg:

                        I have same problem
                        "squid -v" give configure options. In they are present:
                        '–disable-ipf-transparent' '--disable-ipfw-transparent' '--disable-pf-transparent'
                        Can this explain problem?

                        If these options are set, surely it will affect transparent proxy. Going to read up on those options, if this proves to be true the only thing we can do is roll back to a
                        previous version, or the devs may need to update the Squid package.

                        Cheers.

                        1 Reply Last reply Reply Quote 0
                        • E
                          Escorpiom
                          last edited by

                          Definitely a problem with the package. Read here for intercept not working on 3.4.x:

                          https://forums.freebsd.org/threads/transparent-proxy-with-squid33-and-pf.48038/
                          

                          As this affect transparent proxy on PfSense, the next thing to do is submitting a bugreport.
                          If above is not correct, please feel free to comment, else I'm off to fill in the bugreport.

                          Cheers.

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

                            @Escorpiom:

                            Definitely a problem with the package. Read here for intercept not working on 3.4.x:

                            https://forums.freebsd.org/threads/transparent-proxy-with-squid33-and-pf.48038/
                            

                            As this affect transparent proxy on PfSense, the next thing to do is submitting a bugreport.
                            If above is not correct, please feel free to comment, else I'm off to fill in the bugreport.

                            Cheers.

                            I am experiencing the same problem with transparent squid3 on the latest 2.2-RC.  I ran the squid -v and saw the same compile flags mentioning disabling transparent proxy.  I have just finished a re-install with the latest RC to see if my efforts to troubleshoot screwed up squid3, but no luck.

                            Escorpiom, if you are filing a bug for this, can you also add the changes necessary to get squid3 to run in non-transparency mode?  The user HMH had posted the necessary symlinks to resolve some missing libraries:

                            ln -s /lib/libmd.so.6 /usr/lib/libmd5.so.0
                            ln -s /usr/pbi/squid-amd64/local/etc/squid /usr/local/etc/squid
                            ln -s /usr/pbi/squid-amd64/local/libexec/squid /usr/local/libexec/squid
                            

                            adjusting amd64 for i386 as necessary.  I had to set these links in versions prior to the RC and also with the latest RC this afternoon.

                            1 Reply Last reply Reply Quote 0
                            • E
                              Escorpiom
                              last edited by

                              Just got to the bottom of this.
                              This Squid package for 2.2RC is not build correctly and actually it's quite sloppy.

                              Three errors:

                              • Package need to be compiled with "–enable-pf-transparent" as pointed out by firstzerg
                              • Use the "tproxy" directive to be a completely transparent proxy
                              • Instead of port 3128, use port 3129 for intercepted traffic.

                              Details can be found here:

                              http://wiki.squid-cache.org/ConfigExamples/Intercept/OpenBsdPf
                              

                              If Squid 3.4.9 is a beta package you may as well remove it from the list, because it definitely doesn't work.

                              Cheers.

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

                                @Escorpiom:

                                Just got to the bottom of this.
                                This Squid package for 2.2RC is not build correctly and actually it's quite sloppy.

                                Three errors:

                                • Package need to be compiled with "–enable-pf-transparent" as pointed out by firstzerg
                                • Use the "tproxy" directive to be a completely transparent proxy
                                • Instead of port 3128, use port 3129 for intercepted traffic.

                                Details can be found here:

                                http://wiki.squid-cache.org/ConfigExamples/Intercept/OpenBsdPf
                                

                                If Squid 3.4.9 is a beta package you may as well remove it from the list, because it definitely doesn't work.

                                Cheers.

                                The nov 25th build seemed to work fine, if you figure out how to get it installed let me know
                                https://files.pfsense.org/packages/10/All/

                                squid-3.4.9 works
                                squid-3.3.11_1 works

                                squid-3.4.9_1 broken
                                squid-3.3.13_2 broken

                                1 Reply Last reply Reply Quote 0
                                • E
                                  Escorpiom
                                  last edited by

                                  Sorry but so far I did the troubleshooting and it's a confirmed problem with the package.
                                  I'm fairly new here and maybe I misunderstand the priorities of the devs, or maybe Squid is not an essential PFSense component.

                                  Anyway I do not feel we have to fiddle around with packages that are broken or have install issues, simple request: If it isn't finished just don't release it.
                                  Don't let people sort things out on their own without even commenting on issues.

                                  Bug report created:

                                  https://redmine.pfsense.org/issues/4114
                                  

                                  Cheers.

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

                                    squid3-dev 3.3.13_2 is now working in transparent mode.

                                    I installed 12/20 RC build and then performed a clean install of squid3-dev.  When I first enabled transparent mode, it failed.  I left it configured for transparent mode and simply rebooted the firewall.  When it came up, it all works (verified by real time tab).

                                    I will see if the simple reboot works for the squid3 3.4.9_1 package later when I can reboot router without impacting users.

                                    1 Reply Last reply Reply Quote 0
                                    • E
                                      Escorpiom
                                      last edited by

                                      Yes, 3.3.13 works.
                                      Sadly I'm in the same boat, it's not possible to experiment without causing trouble for my users.
                                      I'll test stuff after midnight.

                                      A few days ago there was a second package released for Squid 3.4.9, but that one still won't work for transparent proxy.
                                      Also tried creating a rule to intercept port 80 traffic and redirect to port 3128 or port 3129, but Squid didn't pick it up.
                                      This makes me believe that there may be other issues besides transparent proxy not working.

                                      Cheers.

                                      1 Reply Last reply Reply Quote 0
                                      • F
                                        Firemedic46
                                        last edited by

                                        I have found every time I do a firmware update in 2.2 rc build's, I have to re-install the squid  2.7.9 pkg v.4.3.6 package every time and all is well. Settings are still the same just refresh the package install. If am unable to surf the web! I have no special settings pretty much basic and in transparent mode!

                                        http://www.speedtest.net/my-result/6030868890

                                        1 Reply Last reply Reply Quote 0
                                        • E
                                          Escorpiom
                                          last edited by

                                          I've just made some more tests with Squid 3.4.9.
                                          As transparent proxy doesn't work, it would be possible to create NAT rules to redirect traffic to Squid.
                                          Setting the browser config to use the proxy on port 3128 works, so redirect port 80 to port 3128 should work just fine…

                                          Not so. I found that Squid somehow strips the "http" part, resulting in an "invalid url".
                                          This is the output from the access log:

                                          192.168.31.27 TAG_NONE/400 3555 GET /?host=m.telegraaf.nl&hdn=%2FhmMlNFJ%2FfNLigi3ZtUwuQ%3D%3D - HIER_NONE/- text/html
                                          1419307530.384      0 192.168.31.27 TAG_NONE/400 3551 GET /article/23484473/skiester-14-zwaargewond-door-botsing-tirol - HIER_NONE/- text/html
                                          

                                          the NAT redirect rule however works fine. It's Squid that somehow doesn't know how to process redirected traffic.
                                          So in short, I still haven't got a clue.

                                          Cheers.

                                          1 Reply Last reply Reply Quote 0
                                          • E
                                            Escorpiom
                                            last edited by

                                            Today the Squid package was updated to 3.4.10.
                                            Issues still remain, it is not possible to redirect traffic by means of a NAT rule, error persist:

                                            "invalid URL".

                                            Cheers.

                                            Edit:
                                            Activating the transparent proxy option now yields a different error instead of "no traffic received", observe the pic:

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