0

I'm using squid proxy on Ubuntu 22.04(LTS) with auth_param basic program /usr/lib/squid/basic_db_auth and it's working fine. I am able to add the users to the mysql database and able to use the proxy using those.

I'm also storing the access_log in mysql using logfile_daemon /usr/lib/squid/log_db_daemon.

Now here is the issue

  • suppose I have created 5 users, (user1, user2, user3...)
  • I use the user1 user and password to connect to the proxy
id  time_since_epoch    time_response   ip_client   ip_server       http_status_code    http_reply_size http_method http_url                                    http_username   http_mime_type  squid_request_status    squid_hier_status
1   1677277546.999      16320           xx.xx.xx.xx 45.57.68.152    200                 14495           CONNECT     ipv4-c044-nyc005-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
2   1677277547.005      12854           xx.xx.xx.xx 23.246.7.133    200                 10898           CONNECT     ipv4-c392-nyc001-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
3   1677277547.011      12849           xx.xx.xx.xx 45.57.69.138    200                 10572           CONNECT     ipv4-c021-nyc005-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
4   1677277548.276      5020            xx.xx.xx.xx 23.246.30.134   200                 594             CONNECT     ipv4-c005-ewr002-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
5   1677277548.428      5165            xx.xx.xx.xx 23.246.30.134   200                 594             CONNECT     ipv4-c005-ewr002-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
6   1677277548.522      15736           xx.xx.xx.xx 23.246.30.134   200                 14171           CONNECT     ipv4-c005-ewr002-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
7   1677277548.769      5506            xx.xx.xx.xx 45.57.68.152    200                 594             CONNECT     ipv4-c044-nyc005-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
8   1677277549.24       7252            xx.xx.xx.xx 23.246.31.176   200                 594             CONNECT     ipv4-c096-ewr002-ix.1.oca.nflxvideo.net:443 user1           -               TCP_TUNNEL              HIER_DIRECT
  • It logs the correct user user1

  • Now the same user changes to user2. But here is the issue, after this still the squid keeps logging with user1

  • I have also tried to set auth_param basic credentialsttl 5 seconds in squid config in hope that it will reauthenticate the user every 5 seconds, but this did not helped.

  • The purpose of this is to monitor the data usage of each user, but this make calculate the data inaccurate. Also cannot use the ip_client as multiple users from same network might use the proxy, I want to monitor them individually.

Thank you for reading this much, any help would be appreciated.

0 Answers0