<div dir="ltr">Hi Amos,<div><br></div><div>OK this looks promising (if not actually working...)</div><div><br></div><div>So I have a config line:</div><div><font size="1">external_acl_type userlookup ttl=60 %SRC /opt/squid354/libexec/ext_sql_session_acl -dsn DBI:mysql:database=pf --user root --password xxxx --table currentUsers --uidcol ip  --usercol uid --tagcol ip --persist --debug</font><br></div><div><br></div><div>Where currentUsers looks like:</div><div><div><font size="1">mysql> select * from currentUsers;</font></div><div><font size="1">+------+--------------+---------+</font></div><div><font size="1">| uid  | ip           | enabled |</font></div><div><font size="1">+------+--------------+---------+</font></div><div><font size="1">| 0003 | 10.15.228.12 | 1       |</font></div><div><font size="1">+------+--------------+---------+</font></div></div><div><br></div><div>so running this externally I use:</div><div><br></div><div><font size="1">/opt/squid354/libexec/ext_sql_session_acl -dsn DBI:mysql:database=pf --user root --password fv89j8j6eg2 --table currentUsers --uidcol ip --usercol uid --tagcol ip --debug</font><br></div><div><br></div><div>this replies with a username if I put in:</div><div><anything> 10.15.228.12</div><div><br></div><div>So what is the <anything> about? And I'm still not getting any username in my logfiles. Do I need to use the acl name somewhere else in the config file too? </div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">thanks,<br><br>Jim Potter<br>Network Manager<br>Oasis Brislington (formerly Brislington Enterprise College)<br></div></div></div></div></div>
<br><div class="gmail_quote">On 25 May 2015 at 12:07, 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 25/05/2015 8:38 p.m., Mr J Potter wrote:<br>
> Hi all,<br>
><br>
> I'm setting up a system for using iPads in our school, and I'm stuck a bit<br>
> on tracking what the students are doing on them.<br>
><br>
> First up, I reaaly don't want a Pop-up login box from a 407 response from a<br>
> proxy server, so I'm looking for some other way to track who is doing what.<br>
><br>
> What i have set up so far is PacketFence with an SSL-bump transparent proxy<br>
> (I've put the CAs o all the ipads) which works well in that users have to<br>
> log in before they get internet access. This works (they get a web page,<br>
> login and get 50 minutes of internet before it disconnects them), but the<br>
> only way I have of tracking users is by working out who was on each ipad<br>
> (from packetfence) then matching it against squid logs, which is messy.<br>
<br>
</span>Squid comes bundled with a ext_sql_session_acl helper that looks up a<br>
database and produces OK/ERR (and username for logging) depending on<br>
whether the key given to it exists in the DB already.<br>
<<a href="http://www.squid-cache.org/Versions/v4/manuals/ext_sql_session_acl.html" target="_blank">http://www.squid-cache.org/Versions/v4/manuals/ext_sql_session_acl.html</a>><br>
<br>
You just need to get an UID metric. IP address, MAC address, and/or<br>
EUI-64 (IPv6 link-local) are suitable there. It sounds like your<br>
packetfence would be a good way to populate that DB too.<br>
<span class=""><br>
><br>
> One plan I had would be to add/remove entries in dns or hosts for users,<br>
> eg  IP address 10.2.3.4   -> hostname  fbloggs  (the user's login code) so<br>
> usernames would show up in the client hostname field, but squid caches<br>
> these I think.<br>
<br>
</span>Yes. Dont do that with DNS.<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" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div><br></div></div>