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

    Is there a way to confirm Squid is working?

    Scheduled Pinned Locked Moved pfSense Packages
    14 Posts 4 Posters 4.8k 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.
    • X Offline
      xaviero
      last edited by

      maybe by activating temporary the squid.log , u can tail it and see it HIT or MISS ….. maybe.....

      1 Reply Last reply Reply Quote 0
      • M Offline
        mhab12
        last edited by

        Run```
        #tail -f /var/squid/log/access.log

        1 Reply Last reply Reply Quote 0
        • R Offline
          Roodawakening
          last edited by

          @mhab12:

          Run```
          #tail -f /var/squid/log/access.log

          Great, thanks. There's "stuff" in there but it appears to be from several days ago. I also went to several sites with a client on my LAN and didn't notice anything change on the console after doing so. Hmm…

          "The descent to hell is easy. The gates stand open day and night. But to reclimb the slope and escape to the upper air: This is labor."
          –Virgil, Aeneid, Book 6

          Rob

          1 Reply Last reply Reply Quote 0
          • B Offline
            Bern
            last edited by

            I find that this technique works when I'm trying to find out when I'm behind a transparent proxy…

            pc-bern-host ~ % telnet www.bbc.co.uk 80
            Trying 212.58.251.197…
            Connected to www.bbc.net.uk.
            Escape character is '^]'.
            HEAD http://www.google.co.uk HTTP/1.1
            Host: www.google.co.uk

            HTTP/1.0 200 OK
            Date: Thu, 27 Aug 2009 17:41:02 GMT
            Expires: -1
            Cache-Control: private, max-age=0
            Content-Type: text/html; charset=ISO-8859-1
            Set-Cookie: PREF=ID=1cb5dc1b553c7adc:TM=1251394862:LM=1251394862:S=zCNt-T5gtFSxmMpP; expires=Sat, 27-Aug-2011 17:41:02 GMT; path=/; domain=.google.co.uk
            Server: gws
            X-Cache: MISS from localhost
            Proxy-Connection: close

            Connection closed by foreign host.

            ie. telnet to a known-good webserver on port 80, request a page from a different server and see which of the two replies. If you're being proxied, you'll get the "inner" host replying. If you're not being proxied, your "outer" host will reply.

            1 Reply Last reply Reply Quote 0
            • R Offline
              Roodawakening
              last edited by

              @Bern:

              I find that this technique works when I'm trying to find out when I'm behind a transparent proxy…

              pc-bern-host ~ % telnet www.bbc.co.uk 80
              Trying 212.58.251.197…
              Connected to www.bbc.net.uk.
              Escape character is '^]'.
              HEAD http://www.google.co.uk HTTP/1.1
              Host: www.google.co.uk

              HTTP/1.0 200 OK
              Date: Thu, 27 Aug 2009 17:41:02 GMT
              Expires: -1
              Cache-Control: private, max-age=0
              Content-Type: text/html; charset=ISO-8859-1
              Set-Cookie: PREF=ID=1cb5dc1b553c7adc:TM=1251394862:LM=1251394862:S=zCNt-T5gtFSxmMpP; expires=Sat, 27-Aug-2011 17:41:02 GMT; path=/; domain=.google.co.uk
              Server: gws
              X-Cache: MISS from localhost
              Proxy-Connection: close

              Connection closed by foreign host.

              ie. telnet to a known-good webserver on port 80, request a page from a different server and see which of the two replies. If you're being proxied, you'll get the "inner" host replying. If you're not being proxied, your "outer" host will reply.

              My output just looks like this…

              $ telnet www.bbc.co.uk 80
              Trying 212.58.251.197…
              Connected to www.bbc.net.uk.
              Escape character is '^]'.
              Connection closed by foreign host.

              What'd I do wrong?

              "The descent to hell is easy. The gates stand open day and night. But to reclimb the slope and escape to the upper air: This is labor."
              –Virgil, Aeneid, Book 6

              Rob

              1 Reply Last reply Reply Quote 0
              • R Offline
                Roodawakening
                last edited by

                Incidentally, I'm using a 640GB hard drive on this pfSense box so I have tons of space, if needed. What cache size is recommended? I have it set to 100000 MB (or 100GB).

                "The descent to hell is easy. The gates stand open day and night. But to reclimb the slope and escape to the upper air: This is labor."
                –Virgil, Aeneid, Book 6

                Rob

                1 Reply Last reply Reply Quote 0
                • B Offline
                  Bern
                  last edited by

                  Did you type the "HEAD" and "Host:" lines?

                  Try this instead:

                  pc-bern-host ~ % (echo HEAD http://www.google.co.uk HTTP/1.1; echo Host: www.google.co.uk; echo) | nc www.bbc.co.uk 80
                  HTTP/1.0 200 OK
                  Date: Thu, 27 Aug 2009 17:56:51 GMT
                  Expires: -1
                  Cache-Control: private, max-age=0
                  Content-Type: text/html; charset=ISO-8859-1
                  Set-Cookie: PREF=ID=becdf844de4646ef:TM=1251395811:LM=1251395811:S=fw0Opyy0MpsCcWGz; expires=Sat, 27-Aug-2011 17:56:51 GMT; path=/; domain=.google.co.uk
                  Server: gws
                  X-Cache: MISS from localhost
                  Proxy-Connection: close

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    Roodawakening
                    last edited by

                    OK…I got this:

                    $ (echo HEAD http://www.google.co.uk HTTP/1.1; echo Host: www.google.co.uk; echo) | nc www.bbc.co.uk 80
                    HTTP/1.1 200 OK
                    Date: Thu, 27 Aug 2009 18:04:26 GMT
                    Server: Apache
                    Set-Cookie: BBC-UID=e4da39661c9a8aca15a1fbc961f338dbd123db1a4070d144448f2977cdc6a1bf0; expires=Mon, 26-Aug-13 18:04:26 GMT; path=/; domain=bbc.co.uk;
                    Accept-Ranges: bytes
                    Cache-Control: max-age=0
                    Expires: Thu, 27 Aug 2009 18:04:26 GMT
                    Pragma: no-cache
                    Content-Length: 61338
                    Content-Type: text/html; charset=iso-8859-1

                    Connection closed by foreign host.

                    "The descent to hell is easy. The gates stand open day and night. But to reclimb the slope and escape to the upper air: This is labor."
                    –Virgil, Aeneid, Book 6

                    Rob

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Bern
                      last edited by

                      You're not being transparently proxied then.

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        Roodawakening
                        last edited by

                        @Bern:

                        You're not being transparently proxied then.

                        UGH! I'm confused by the concurrent use of Squid and HAVP. It appears HAVP is running (via whatismyip) but now Squid is not.

                        "The descent to hell is easy. The gates stand open day and night. But to reclimb the slope and escape to the upper air: This is labor."
                        –Virgil, Aeneid, Book 6

                        Rob

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