44.14. Viewing Cache Manager Statistics

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.
Leave the Cache Host field set to localhost, unless you want to connect to another proxy. Most have ACLs set up by default to deny cache manager access from anywhere except localhost, though.

3.
In the Cache Port field, enter the TCP port number that your proxy is listening on, such as 8080.

4.
The Manager name and Password fields can be left empty unless Squid has been configured to require authentication for retrieving statistics, which is not usually the case.

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.
When you are done viewing cache statistics, click on the Return to squid index link at the bottom of the page to go back to the module's main menu.

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.59.109