<div dir="ltr"><div>Thanks a lot for the reply Amos.</div>I tried the following:<div><br></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px">acl station-ip src </span><a href="http://192.168.1.0/24" rel="noreferrer" target="_blank" style="font-size:12.8000001907349px">192.168.1.0/24</a><br></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px">acl station-domain dstdomain /usr/local/squid/station-domain.acl</span><br></div><div><font color="#500050"><span style="font-size:12.8000001907349px">http_access allow  station-ip </span></font><span style="color:rgb(80,0,80);font-size:12.8000001907349px">station-domain</span><br></div><div><font color="#500050"><span style="font-size:12.8000001907349px">http_access deny kiosk-ip</span></font><br></div><div><font color="#500050"><span style="font-size:12.8000001907349px"><br></span></font></div><div><font color="#500050"><span style="font-size:12.8000001907349px">This order of rules only denies everything instead of allowing atleast domains in </span></font><span style="color:rgb(80,0,80);font-size:12.8000001907349px">station-domain.acl</span></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px"><br></span></div><div><span style="color:rgb(80,0,80);font-size:12.8000001907349px">My requirement is that everyone in that subnet should be able to access domains in </span><span style="color:rgb(80,0,80);font-size:12.8000001907349px">station-domain.acl only. Sites outside the list have to be blocked for them.</span></div><div><font color="#500050"><span style="font-size:12.8000001907349px"><br></span></font></div><div><font color="#500050"><span style="font-size:12.8000001907349px"><br></span></font></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 10:17 PM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2/09/2015 1:28 a.m., jake driscoll wrote:<br>
> here is my requirement:<br>
><br>
>> i have a subnet<br>
>> only a small list of sites need to be allowed access to this subnet<br>
>> this subnet should not get access to any other site except the ones in the<br>
> list<br>
>> access for other users will remain the same<br>
><br>
> I tried the following<br>
><br>
> acl station-ip src <a href="http://192.168.1.0/24" rel="noreferrer" target="_blank">192.168.1.0/24</a><br>
> acl station-domain dstdomain <a href="http://www.google.com" rel="noreferrer" target="_blank">www.google.com</a> <a href="http://www.bbc.com" rel="noreferrer" target="_blank">www.bbc.com</a><br>
> http_access deny station-ip !station-domain<br>
<br>
<br>
</span>That is correct for "subnet should not get access to any other site<br>
except the ones in the list".<br>
<br>
<br>
But you had more requirements in your description ...<br>
<br>
<br>
 ... "sites need to be allowed access to this subnet"<br>
<br>
Meaning you need an allow line somewhere that does that allowing.<br>
Such a line might exist in your config already in another form.<br>
<br>
At worst adding this line directly underneath the ones above will cause<br>
that policy requirement to happen as well:<br>
<br>
   http_access allow station-ip<br>
<br>
<br>
 ... "access for other users will remain the same"<br>
<br>
Without seeing your full squid.conf http_access rules and all associated<br>
ACL definitions we can't help with that "the same" part. Except to say:<br>
<br>
   Order is IMPORTANT.<br>
<br>
Where you place a http_access line in the sequence with *all* other<br>
http_access rules matters a LOT about whether it is even tested, whether<br>
it will match at that time, and what will happen.<br>
<br>
I *guess* you need to place these four new lines near the top of your<br>
list of http_access list right under the default configs "CONNECT<br>
!SSL_ports" line.<br>
<span class=""><br>
<br>
><br>
> and also this -<br>
> http_access deny station-ip<br>
> http_access allow station-ip station-domain<br>
><br>
<br>
</span>Good example of what I mean about order affecting matching.<br>
<br>
100% of all traffic from station-ip will match that "deny" line.<br>
<br>
The "allow" line will only be reached by non-'station-ip' traffic. It<br>
will thus _never_ match, and does nothing.<br>
<br>
<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div><br></div>