Debian bullseye build of squid with basic auth support
973
/etc/squid/auth
htpasswd -c /etc/squid/auth/users squiduser
#Basic auth
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/auth/users
auth_param basic realm Squid Proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
#Match IP's as sources
acl src-10.3.1.114-tools src 10.3.1.114
acl src-10.3.1.146-portainer src 10.3.1.146
acl src-10.0.0.0_8-dockerlans src 10.0.0.0/8
#Define destination domains/IPs
acl dst-ifconfig.co dstdomain ifconfig.co
acl dst-192.168.68.11-orange dst 192.168.68.11
acl dst-192.168.68.0_22-hostlan dst 192.168.68.0/22
acl dst-192.168.68.10-pihole dst 192.168.68.10
#Define ports
acl port-9001 myport 9001
#Allow access rules, note some authenticated, using the src, dst objects we defined above
http_access allow src-10.3.1.114-tools dst-192.168.68.10-pihole
http_access allow authenticated src-10.3.1.114-tools dst-192.168.68.11-orange port-9001
http_access allow authenticated src-10.3.1.146-portainer dst-192.168.68.11-orange port-9001
http_access deny src-10.0.0.0_8-dockerlans dst-192.168.68.0_22-hostlan
http_access allow authenticated src-10.0.0.0_8-dockerlans dst-ifconfig.co
http_access deny all
#Squid default port
http_port 3128
Content type
Image
Digest
sha256:228d14b8e…
Size
96.2 MB
Last updated
about 1 year ago
docker pull numenor23/squid