Archive for September, 2010

How to enable squid authentication with htpasswd

.

Hi again

if you decided to have a squid web proxy which has authentication system. the simplest way is that creating an file and save the usernames and password in it. you can just create the file by touch command.

then change its permission and owner in way that squid has an permision to read it.

after all just add the following configuration file into your squid.conf file.

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl ncsa_users proxy_auth REQUIRED
acl ncsa_users1 urlpath_regex kasper
http_access allow ncsa_users
http_access allow ncsa_users1

then for creating a new password just use the following command.

htpasswd /etc/squid/passwd user1

thats it. I will pu some configuration about the other methods of squid configuration later. but if you have any question about this do not hesitate to contact me.

Regards

refrences : http://www.cyberciti.biz/tips/linux-unix-squid-proxy-server-authentication.html


     Copyrighted Mehdi Behamin , All Rights Reserved
    
Blog has been visited 186957 times