No usernames in squid logs when using captive portal
-
Hello,
Apologies, I can see that there are threads on this issue before but I have been unable to find a solution.
I have a PFSense setup with Squidv3, lightsquid, squidguard and captive portal.
I have the captive portal authenticating via Radius (this works)…I can see the username in the captive portal log, so that bit is working.
Lightsquid is reading logs with IP addresses but I get a '?' for the user section.
In the proxy settings, I have selected Captive Portal from the dropdown list for authentication, do I have to do anything else on this page?
Thanks,
Robin. -
You won't get any such info in there. The "username" for the CP auth is the IP address of the device.
https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/bin/check_ip.php#L52
-
Hi,
Thanks for the reply.
Now that you mention that it does make sense, the IP is in the 'user' column of the log after all! ::)
So is there no way to get the username (as shown by cp) to go into the real name column?
I am relatively competent with PHP but I am completely new to PFSense (coming from smoothwall express). If I were to modify something, would it just be undone by a future update?
![captive portal.png](/public/imported_attachments/1/captive portal.png)
![captive portal.png_thumb](/public/imported_attachments/1/captive portal.png_thumb)
-
This is not my code. As said above and linked, it just queries the CP DB for the client IP and either authenticates it or not. You can do whatever you want with the /usr/local/bin/check_ip.php script, I don't think anyone's going to touch it anytime soon. (Obviously, you will have to patch it everytime Squid is reinstalled/updated.)
-
I had some limited sucess with chaning the output but it seems that the function is used for other things aside from logging entries from captive portal.
I had a look in the logs and noticed that the username is in them.
I had a quick search for the LightSquid docs. I actually found it a little hard to follow this guide but it has sorted the issue!
??? http://webcache.googleusercontent.com/search?q=cache:oC3IJyFON78J:lightsquid.sourceforge.net/How%2520It%2520Work.html+&cd=1&hl=en&ct=clnk&gl=uk