So, we can use network port numbers to identify requests and then combine them with an access rule to control access to resources. Squid provides an ACL type
, which can be used to declare one or more port numbers to construct an ACL. Let's see a simple example:
acl allowed_port port 80
The previous ACL will match any request for port 80 on the destination server requests. The ACL type
port can take more than one port or a range of ports as an argument. So, if we want to assign multiple ports, we can list them as follows:
acl allowed_ports port 80 443 1025-65535
will match all the requests requesting a connection to ports 80, 443, or any within the range of 1025 ...