Friday, July 8, 2011

How to enable user authentication in squid proxy

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

Suppose you have an ip 1.2.3.4 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

eg:-
acl auth_user2 proxy_auth test_user REQUIRED
tcp_outgoing_address 1.2.3.4 auth_user2
http_access allow auth_user2

And also you can create passwords for the users by using the following command
#htpasswd passwordfile username
eg:-
#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. 
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.