
Before starting configuration refer my previous post about How
to configure Ldap server.
Step # 1: Make sure squid
can talk to LDAP server
Before
configuring makes sure that the squid is working with LDAP auth. Type the
following command:
# /usr/lib/squid/squid_ldap_auth -b "dc=openpath,dc=com" -f "uid=%s" server.openpath.com
# /usr/lib/squid/squid_ldap_auth -b "dc=openpath,dc=com" -f "uid=%s" server.openpath.com
Once
you hit enter key you need to provide UID and password using following format:
aman blankspace redhat@123
aman blankspace redhat@123
If it
was able to connect to LDAP server you will see “ok“.
Step # 2: Configuration
Open
your squid.conf file:
# vi /etc/squid/squid.conf
# vi /etc/squid/squid.conf
Next
you need to add following code which specifies the base DN under where your
users are located and the LDAP server name.
auth_param basic program /usr/lib/squid/squid_ldap_auth -b "dc=openpath,dc=com" -f "uid=%s" -h 192.168.0.237 or server.openpath.com
acl ldapauth proxy_auth REQUIRED
http_access allow ldapauth
http_access deny all
auth_param basic program /usr/lib/squid/squid_ldap_auth -b "dc=openpath,dc=com" -f "uid=%s" -h 192.168.0.237 or server.openpath.com
acl ldapauth proxy_auth REQUIRED
http_access allow ldapauth
http_access deny all
Save
and close the file. Restart Squid to take effect.
# /etc/init.d/squid restart
# /etc/init.d/squid restart
Enjoy!
Comments
Post a Comment