Testing access control with squidclient
We learned in Chapter 3 that we should always test our configuration file for errors or warnings before deploying it on the production servers. Squid provides the command-line option -k parse
using which the configuration file can be parsed quickly.
However, successful parsing of the configuration file doesn't guarantee that Squid will be able to allow or deny the requests or replies in the manner we are expecting. As the configuration files grows in size, the number ACL lists and corresponding rules keeps on increasing, which may sometimes lead to confusion. To test the access control in our new configuration file, we can use the squidclient
program.
For this purpose, we'll either need a different test server or we'll need to compile Squid on the production server with a different --prefix
option with the configure program. For example, we can compile Squid using the following commands:
configure --prefix=/opt/squidtest/ make make install
The previous...