Time for action – constructing ACL lists using IP addresses
The two ACL types,
src
anddst
, are used to identify the source and destination IP addresses of a particular request. There are different ways to specify the IP addresses. The first one is to specify a single IP address per ACL element, as follows:acl client src 192.0.2.25/32
The previous ACL element will match all the requests being generated from the client
192.0.2.25
. We are supposed to specify a mask while specifying the IP address, but if we don't then, Squid will try to determine the mask automatically. To learn more about mask, and Classless Inter Domain Routing (CIDR) notation, please check http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing and http://en.wikipedia.org/wiki/CIDR_notation. For example, the ACL following element will also identify the requests from the client192.0.2.25
:acl client src 192.0.2.25
Therefore, in the previous example, Squid will automatically set the mask to
32
. So we have covered the...