Time for action – testing our access control example with squidclient
We now need to run the squidclient
to fetch http://malware.example.com/
to check if we get an access denied error or not. If we are running the squidclient
on the production server, then we don't need to use the -h
option to specify the hostname. In this scenario, we can run the squidclient
with the -p
option to specify the port.
./squidclient -p 8080 http://malware.example.com
However, if we are running the squidclient
on a different machine, we will have to use the -h
option to specify the hostname of the proxy server. In this scenario, we can run the squidclient
with the following configuration:
./squidclient -h proxy.example.com -p 8080 http://malware.example.com
If our access control rules are working and they are rightly placed in the configuration file, we should get an output similar to the following:
HTTP/1.0 403 Forbidden Server: squid/3.1.4 Date: Mon, 06 Sep 2010 09:28:38 GMT Content-Type: text/html Content-Length...