Search squid archive

Re: Fwd: Getting a squid clients list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/09/21 1:28 am, U Zee wrote:
Can anyone help with running squidclient remotely and getting the list of clients, or any other way to get the list of clients?



You just need to adjust the squid.conf of the running Squid to allow management access to the machine you are fetching from.


Be aware:
Make sure that you only use reconfigure and avoid a restart of the proxy after making these changes. A restart will erase some or all of the info you are looking to find.


With the CLIENT_IP being address of the machine you are going to do the fetch from these commands go at the top of squid.conf:

  acl mgr_client src CLIENT_IP
  http_access allow mgr_client
  cachemgr_passwd none client_list


... *reconfigure* (not restart) the proxy.

... run the squidclient fetch you want

.. undo or at least comment out the above settings and reconfigure.



Amos


Thanks very much

On Tuesday, August 31, 2021, 05:50:12 PM GMT+3, U Zee <uzee001@xxxxxxxxx> wrote:


Thanks for the pointer Eliezer. I installed it on an Ubuntu 20 machine and tried but it didn't seem to work:

root@ub20-srv1:~# squidclient -h squid.mydomain.com mgr:client_list
HTTP/1.0 403 Forbidden
Server: squid/2.6.STABLE13
Date: Tue, 31 Aug 2021 14:45:09 GMT
Content-Type: text/html
Content-Length: 1115
Expires: Tue, 31 Aug 2021 14:45:09 GMT
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from squid.mydomain.com
Via: 1.0 squid.mydomain.com:3128 (squid/2.6.STABLE13)
Proxy-Connection: close

root@ub20-srv1:~# squidclient -h squid.mydomain.com  mgr:info
HTTP/1.0 403 Forbidden
Server: squid/2.6.STABLE13
Date: Tue, 31 Aug 2021 14:46:33 GMT
Content-Type: text/html
Content-Length: 1101
Expires: Tue, 31 Aug 2021 14:46:33 GMT
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from squid.mydomain.com
Via: 1.0 squid.mydomain.com:3128 (squid/2.6.STABLE13)
Proxy-Connection: close

Although the proxy function seems to be working, but I cannot get the "mgr" function to work:

root@ub20-srv1:~# squidclient -h squid.mydomain.com -v http://vmware.com
Request:
GET http://vmware.com HTTP/1.0
Host: vmware.com
User-Agent: squidclient/4.10
Accept: */*
Connection: close
.
HTTP/1.0 301 Moved Permanently
Location: https://www.vmware.com/
Content-Length: 0
X-Cache: MISS from squid.mydomain.com
Via: 1.0 squid.mydomain.com:3128 (squid/2.6.STABLE13)
Proxy-Connection: close





On Monday, August 30, 2021, 02:56:29 PM GMT+3, NgTech LTD <ngtech1ltd@xxxxxxxxx> wrote:



Hey Uzee,

You can use squidclient from another machine to access this machine.
I do not remember how by heart but Amos might know if I am guessing right.

Eliezer

בתאריך יום ב׳, 30 באוג׳ 2021, 14:44, מאת U Zee ‏<uzee001@xxxxxxxxx <mailto:uzee001@xxxxxxxxx>>:

    <sigh> I know and sadly installing it is not possible either.
    Without going into the details too much, its a machine with a legacy
    environment where yum and some other tools are broken and people who
    knew about the configs are long gone.

    On Monday, August 30, 2021, 01:29:47 PM GMT+3, Amos Jeffries
    <squid3@xxxxxxxxxxxxx <mailto:squid3@xxxxxxxxxxxxx>> wrote:


    On 30/08/21 10:18 pm, U Zee wrote:
     > Thanks Amos. I don't think the clientdb features you mentioned are
     > enabled, I'm getting a command not found.
     > Also I don't see anything configured for logging in squid.conf (I
    don't
     > know if there is any other place for it)
     >
     > bash-3.00# ps -ef|grep squid
     > root      2467     1  0  2020 ?        00:00:00 /usr/squid/sbin/squid
     > nobody    2471  2467  0  2020 ?        07:49:45 (squid)
     > root     28018 20110  0 13:12 pts/0    00:00:00 grep squid
     >
     > bash-3.00# /usr/squid/sbin/squid -v
     > Squid Cache: Version 2.6.STABLE13
     > configure options: '--prefix=/usr/squid' 'CC=gcc' 'CFLAGS=-O3 -g'
     >
     > bash-3.00# squidclient mgr:client_list | grep "Address"
     > bash: squidclient: command not found

    That is the squidclient tool missing on your machine.


    Amos
    _______________________________________________
    squid-users mailing list
    squid-users@xxxxxxxxxxxxxxxxxxxxx
    <mailto:squid-users@xxxxxxxxxxxxxxxxxxxxx>
    http://lists.squid-cache.org/listinfo/squid-users
    <http://lists.squid-cache.org/listinfo/squid-users>
    _______________________________________________
    squid-users mailing list
    squid-users@xxxxxxxxxxxxxxxxxxxxx
    <mailto:squid-users@xxxxxxxxxxxxxxxxxxxxx>
    http://lists.squid-cache.org/listinfo/squid-users
    <http://lists.squid-cache.org/listinfo/squid-users>

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx <mailto:squid-users@xxxxxxxxxxxxxxxxxxxxx>
http://lists.squid-cache.org/listinfo/squid-users <http://lists.squid-cache.org/listinfo/squid-users>

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux