I want to setup squid on my home pc where many people uses the same pc. What can i do to verify users based on their account on the pc ?

1 Answer 1


You can setup authentication (of varying levels and complexity) in Squid to prompt for user/pass by the person browsing. For such a small implementation, I'd maybe recommend using basic authentication, but your decision.

You can review the documentation here: https://wiki.squid-cache.org/Features/Authentication

But essentially, for Basic Authentication you'll need to install the apache2-utils package. Then follow this:

sudo touch /etc/squid/passwd
sudo chown proxy: /etc/squid/passwd
sudo htpasswd /etc/squid/passwd user1

Now we need to edit the squid.conf for authentication. Towards the bottom and before you http_access allow none, you'll want this:

auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Authentication for Squid Proxy
auth_param basic credentialsttl 6 hours
acl auth_users proxy_auth REQUIRED
http_access allow auth_users

Now restart squid and when you access the proxy you'll be prompted for user/pass. There are helper applications that allow the user to modify their own password after the fact, but for a single instance, it probably isn't necessary.

Good luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.