Friday, July 8, 2011

How to enable user authentication in squid proxy


This post explains how to enable user authentication on a squid proxy. 

Suppose you have an ip to be enabled for a user test_user 

Syntax :
acl acl_name proxy_auth username REQUIRED
tcp_outgoing_address ipaddress acl_name
http_access allow acl_name

acl auth_user2 proxy_auth test_user REQUIRED
tcp_outgoing_address auth_user2
http_access allow auth_user2

And also you can create passwords for the users by using the following command
#htpasswd passwordfile username
#htpasswd /etc/squid/squidpasswd test_user
New password: *type the password here
Re-type new password: *retype the password here

Save the squid configuration file and restart the service. 

No comments:

Post a Comment

Be nice. That's all.