Time for action – testing a complex access control

An access control involving IP addresses from different subnets is a bit difficult to test but can be tested using the squidclient. This can be done by creating virtual or alias network interfaces on the machine. For example, the IP address of our proxy server is 192.168.36.204 and we have the following access control configuration in our squid.conf, which we want to test:

acl bad_guys src 10.1.33.9 10.1.33.182
http_access deny bad_guys

We can't test these rules directly as our IP address is different from the clients we have blocked and Squid will check for the source IP address in the requests. However, we can use option -l, which is available with the squidclient, which will bind it to a different ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.