title: How to combine ACLs and enable authentication in Squid3 web proxy server?
body: <p>I'm facing some difficulties while applying a filter to authenticated users in squid3 web proxy server version 3.3.8 .</p>
  <p>I already configured squid3 as follows:</p>
  <ul>
  <li>NCSA Authentication</li>
  </ul>
  <blockquote>
  <p>auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords</p>
  <p>auth_param basic children 5</p>
  <p>auth_param basic realm Squid Proxy Web Server</p>
  <p>auth_param basic credentialsttl 2 hours</p>
  <p>auth_param basic casesensitive on</p>
  </blockquote>
  <ul>
  <li>Custome ACLs</li>
  </ul>
  <p>I created some new ACLs as follows:</p>
  <blockquote>
  <p>acl group1 src &quot;/etc/squid3/group1_ips.txt&quot; proxy_auth REQUIRED</p>
  <p>acl bad_domains dstdomain &quot;/etc/squid3/bad_domains.txt&quot;</p>
  </blockquote>
  <p>where group1_ips.txt is a file containing the list of I IPs of a certain group1 and bad_domains.txt is a file containing the list of domains I want to filter.</p>
  <ul>
  <li>http_access</li>
  </ul>
  <p>Now in http_access I made the following:</p>
  <blockquote>
  <p>http_access deny bad_domains group1</p>
  <p>http_access allow all</p>
  </blockquote>
  <ul>
  <li>My problem is:</li>
  </ul>
  <p>Authenticating a list of users via their IP and to prevent them from logging into some web sites. Basically this line of code which does not work.</p>
  <blockquote>
  <p>acl group1 src &quot;/etc/squid3/group1_ips.txt&quot; proxy_auth REQUIRED</p>
  </blockquote>
  <p>However this line works:</p>
  <blockquote>
  <p>acl group1 proxy_auth REQUIRED</p>
  </blockquote>
  <p>But I want the group1 ACL to use the src argument.
  I tried this also but it did not work:</p>
  <blockquote>
  <p>acl group1 src &quot;/etc/squid3/group1_ips.txt&quot;</p>
  <p>acl group1 proxy_auth REQUIRED</p>
  </blockquote>
  <p>Please how can I solve this: Applying a Filter to authenticated users?</p>
  <p>Thank you in advance.</p>