This is a quick guide showing how to configure Squid IP whitelist, limiting connections to Squid proxy server only from particular IPs.
Configuration of Squid IP whitelist is very simple. You only have to configure ACLs matching your desired IPs and use them together with http_access directive.
The code below shows an example configuration to allow only three IPs to connect with Squid proxy. This code is all you need to setup Squid IP whitelist.
# Allowed clients acl client_adam src 184.108.40.206 acl client_rick src 220.127.116.11 acl client_anna src 18.104.22.168 http_access allow client_adam http_access allow client_rick http_access allow client_anna # be sure it's the last entry, always below ALLOW entries! http_access deny all
Enter the code above to your Squid configuration file (ie. /etc/squid/squid.conf) and reload the server (ie. with service squid reload command) to get your Squid IP whitelist working.
Learn more about Squid