Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
19.1 Legacy Series
»
Local user auth via Captive portal + Transparent Proxy username in Squid Log
« previous
next »
Print
Pages: [
1
]
Author
Topic: Local user auth via Captive portal + Transparent Proxy username in Squid Log (Read 9298 times)
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
on:
March 21, 2019, 10:02:57 am »
Hi All,
I am testing Opnsene 19.2 have enabled Captive Portal and Transparent proxy for HTTP/HTTPS. My problem is that when i check the Squid Log i could only see the client logged IP address and mac but not the username. Is that as per design ? Do we have a way to get it working by tweaking configuration/patch ? Or What should be the best approach? if I have to write a script to append authenticated username via Captive Portal in Squid access log along with IP address, mac and username suggest me where to start with.
Thanks
«
Last Edit: March 21, 2019, 10:07:51 am by rackg
»
Logged
-RackG
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #1 on:
March 21, 2019, 09:01:07 pm »
19.7 switches to pure PAM auth, maybe the logging is better there, but I don't know. Right now in 19.1 it's using a custom script so that might be the reason.
Cheers,
Franco
Logged
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #2 on:
March 22, 2019, 05:37:39 am »
Thanks Franco. But I would like to stay with 19.2 since 19.7 is beta. Can you point me to the script location used for the extended loging in squid+captive portal.
Sent from my Redmi 6 Pro using Tapatalk
Logged
-RackG
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #3 on:
March 22, 2019, 07:49:39 am »
I'm not saying you should use 19.7 -- I simply want to lay out the facts.
Here's the script it's currently using:
https://github.com/opnsense/core/blob/stable/19.1/src/etc/inc/plugins.inc.d/squid/auth-user.php
Cheers,
Franco
Logged
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #4 on:
March 22, 2019, 01:21:34 pm »
Thanks for the heads up but I would definitely try 19.7a however getting username fixed is going to be first priority now. I am sure I can test 19.7 sometime and share some feedback on this regard.
Sent from my Redmi 6 Pro using Tapatalk
Logged
-RackG
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #5 on:
March 30, 2019, 12:27:38 pm »
Dear Franco,
I think the particular authentication syslog never get logged into the system.log or squid log I could only see in portal log for the username auth. So I think the issue exist some whereelse. Do you think trying with active directory make sense ? Or issue with local authentication.
Logged
-RackG
bartjsmit
Hero Member
Posts: 2014
Karma: 194
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #6 on:
March 30, 2019, 02:31:14 pm »
I haven't used Squid for a while, but aren't user authentication and transparent mode mutually exclusive?
If the browser is unaware of the proxy, how/why should it offer credentials without knowing the proxy's address?
Bart...
Logged
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #7 on:
March 31, 2019, 04:48:23 am »
Authentication work fine, the issue is on logging the username. I see couple of posts regarding logging issue with Squid and Captive portal. Squid only logs mac and ip address and not the username. Captive portal logs the AUTH session details. The issue is mainly how Captive portal parse the userid so that squid.conf can understand and could push the username in extended-log/syslog. I doubt this is more do to with Captive portal or local authentication. Please correct me if i am wrong.
«
Last Edit: March 31, 2019, 08:19:08 am by rackg
»
Logged
-RackG
bartjsmit
Hero Member
Posts: 2014
Karma: 194
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #8 on:
March 31, 2019, 09:04:00 am »
That's cool, thanks for the clarification. I thought that Squid was doing the authentication.
Bart...
Logged
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #9 on:
April 01, 2019, 10:51:47 am »
Dear Franco/Opnsense Team,
Issue remains same with Active Directory authentication also. So its very clear that Captive Portal Authentication does use only IP address for authentication to Squid and not username.
No one else has this issue ? I saw in pfsense has the same issue some one reported the it here.
https://forum.netgate.com/topic/110107/no-usernames-in-squid-logs-when-using-captive-portal/5
. They have asked to fix it in
https://github.com/pfsense/FreeBSD-ports/blob/devel/www/pfSense-pkg-squid/files/usr/local/bin/check_ip.php#L52
I dont see the same code check_ip.php in Opnsense code path. So suggest me the script i need to look for to fix this .
Logged
-RackG
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #10 on:
April 02, 2019, 04:42:33 pm »
Guys any one who can help me to work around this issue.
Logged
-RackG
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #11 on:
April 03, 2019, 10:56:01 am »
It's best to raise a ticket here to discuss technical matters such as this.
https://github.com/opnsense/core/issues/new/choose
I was under the impression the code pointer requested would have been of help to you but it seems not?
It is also unclear if the development version works in this regard already or if it was not tried...
Cheers,
Franco
Logged
rackg
Jr. Member
Posts: 68
Karma: 3
Ethical hacker
Re: Local user auth via Captive portal + Transparent Proxy username in Squid Log
«
Reply #12 on:
April 05, 2019, 06:37:10 am »
I dont know if that make any difference since i am only the person in the forum asked for this feature or having issue otherwise. Wondering how every users of this product using this access log features on the need of dynamic ip address to user systems with Firewall running with Captive portal Authentication + squid Transparent mode. So i would stop here until i hear from some one else how they are using this features for access log verification. Thanks Franco you are awesome.
Logged
-RackG
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
19.1 Legacy Series
»
Local user auth via Captive portal + Transparent Proxy username in Squid Log