Squid proxy and cache server guide

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 216.58.213.46
acl client_rick src 206.190.36.45
acl client_anna src 66.135.216.190

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