<div dir="ltr">Hello,<div><br></div><div>I think I figured out what the problem is but I'd appreciate if someone could check my reasoning. </div><div><br></div><div>My ACL is type localport, so I'm targeting the original request to Squid based on the Squid port the client is connecting to:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">acl test localport 4000</span><br></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Then I enable adaptation_access based on the ACL test:</span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></span></div><div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">adaptation_access service_avi_req allow test<br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">adaptation_access service_avi_resp allow test</div></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">So here is where I think the problem is.  The client is connecting to Squid on port 4000, so the initial request it put in the ACL "test", however for some reason this ACL is not being</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">hit when adaptation_access is being used. I'm wondering if the reason is because localport is no longer the port the client connected to Squid on, but rather the port Squid is using to connect to the ICAP server?</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">I've verified with full debugging that the test ACL is not matched in the adaptation checks:</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">(initial request)</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(70) preCheck: 0xf3c2f8 checking slow rules</div><div>2016/07/15 10:32:44.246 kid1| 28,3| ServerName.cc(42) match: checking '64.182.224.149'</div><div>2016/07/15 10:32:44.246 kid1| 28,3| ServerName.cc(47) match: '64.182.224.149' NOT found</div><div>2016/07/15 10:32:44.246 kid1| 28,3| ServerName.cc(42) match: checking 'none'</div><div>2016/07/15 10:32:44.246 kid1| 28,3| ServerName.cc(47) match: 'none' NOT found</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: nobumpSites = 0</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: (ssl_bump rule) = 0</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: Test = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: (ssl_bump rule) = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: (ssl_bump rules) = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(63) markFinished: 0xf3c2f8 answer ALLOWED for match</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(163) checkCallback: ACLChecklist::checkCallback: 0xf3c2f8 answer=ALLOWED</div><div><br></div></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">(And now I'm guessing this is adaptation checking ACL's)</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(70) preCheck: 0xf40bb8 checking slow rules</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Ip.cc(539) match: aclIpMatchIp: '<a href="http://192.168.100.6:61769">192.168.100.6:61769</a>' found</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: http_access#1 = 1<br></div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: http_access = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(63) markFinished: 0xf40bb8 answer ALLOWED for match</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(163) checkCallback: ACLChecklist::checkCallback: 0xf40bb8 answer=ALLOWED</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(70) preCheck: 0xf3c2f8 checking slow rules</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: Test = 0</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: adaptation_access#1 = 0</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Ip.cc(539) match: aclIpMatchIp: '<a href="http://192.168.100.6:61769">192.168.100.6:61769</a>' found</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: all = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: adaptation_access#2 = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Acl.cc(158) matches: checked: adaptation_access = 1</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(63) markFinished: 0xf3c2f8 answer DENIED for match</div><div>2016/07/15 10:32:44.246 kid1| 28,3| Checklist.cc(163) checkCallback: ACLChecklist::checkCallback: 0xf3c2f8 answer=DENIED</div><div><br></div></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">What I don't get however is in this above log entry snapshot, the client source port (192.168.100.6) is shown, so I'd assume the localport would match.</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">This works if I change the ACL type to src IP address rather than localport, however the whole point of this is because I have another facility that is categorizing users by group and distributing them to Squid on specific destination ports.  So I really need this to work based on localport. </div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Any thoughts?</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 15, 2016 at 6:53 AM, Yuri Voinov <span dir="ltr"><<a href="mailto:yvoinov@gmail.com" target="_blank">yvoinov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
<br>
<br>
</span>15.07.2016 15:41, Amos Jeffries пишет:<br>
<span class="">> On 15/07/2016 6:35 a.m., Yuri Voinov wrote:<br>
>><br>
>><br>
>><br>
<a href="http://wiki.squid-cache.org/action/show/HelpOnAccessControlLists?action=show&redirect=HelpOnAcl" rel="noreferrer" target="_blank">http://wiki.squid-cache.org/action/show/HelpOnAccessControlLists?action=show&redirect=HelpOnAcl</a><br>
>><br>
><br>
> Yrui;  note that the "HelpOn" wiki pages are for help using the wiki<br>
> itself. Not help using Squid.<br>
</span>Oooooooops. My mistake.<br>
<span class="">><br>
><br>
> I think you meant to reference:<br>
> <<a href="http://wiki.squid-cache.org/SquidFaq/SquidAcl" rel="noreferrer" target="_blank">http://wiki.squid-cache.org/SquidFaq/SquidAcl</a>><br>
</span>Yes, sure.<br>
<span class="">><br>
><br>
> Amos<br>
><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>
<br>
</span><span class="">-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2<br>
<br>
</span>iQEcBAEBCAAGBQJXiMCiAAoJENNXIZxhPexGqdcH/02vxPWujZRDFeK6BZOXkGiX<br>
IwAR6A3ovJpaucTaQhMXZUblIOcWXKs9MzZ2vwS8dCXaK6cppTWYL5+2rjxelOER<br>
YE7Sjwf7J1gxC7DoHfvXkCWSL8ueBnF+9xrWj/dflaZBYRqGqdmUq0QT7FqTXXBu<br>
8EGnXvyORd7Ta9xgEuhjwLcUkQ51wMRd4CB861LmmidHD2nXm78DaYomIHKanYtD<br>
fcE+i7G6tQyUBh9V0F5IEa6p6/PfvTokLbO5OlsJhGIE5rb8DoA7P78q7X2WJJi6<br>
89dR2mW+G8bcKmnVWLy8gl5Q1k8ByUvkmKbapdsuOOyzKK6grsY7nqE7+MyffRQ=<br>
=1gkl<br>
-----END PGP SIGNATURE-----<br>
<br>
<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>
<br></blockquote></div><br></div>