The Squid software comes with a simple CGI program called cachemgr.cgi that can connect to the proxy and request statistics about memory utilization, cache hits and misses, and DNS lookup caching. Even though it is normally installed to be run from a web server like Apache, you can access it from within this Webmin module by following these simple steps:
1. | On the main page, click on the Cache Manager Statistics icon to bring up the program's login form. |
2. | |
3. | |
4. | |
5. | Hit the Continue button to log in, and a page listing all the various types of statistics available will appear. Click on any of the links to display the detailed information. |
6. |
Because Squid accepts any requests using the special cache_object protocol from localhost without authentication by default, anyone who can log in to your system via telnet or SSH could run their own version of cachemgr.cgi to view these statistics. Even though the information available is not particularly sensitive, you may want to set up Squid to require a username and password be supplied to access it.
This can be done by setting up external authentication and then editing the default Allow manager localhost proxy restriction so that the new auth ACL is selected in the Match ACLs column as well. Or better still, you can create another External Auth ACL that has only a few users who are allowed to view statistics listed and assign that to the proxy restriction. This is even more secure because it avoids the problem of every telnet or SSH user who also has a normal proxy login being able to access statistics.
18.219.59.109