[squid-users] squid 3.1 ldap authentication
nando mendonca
nandomendonca007 at gmail.com
Mon Jan 25 15:52:35 UTC 2016
Hi All,
I'm running squid 3.5.12, i'm using ldap for authentication. When trying to
browse the internet from clients it takes up to 10 minutes for the website
to load. Can you please assist me in troubleshooting what the issue is?
Below is my squid.conf file.
cache_mem 1048 MB
cache_log /usr/local/squid1/var/logs/cache.log
cache_swap_high 95
cache_swap_low 90
dns_nameservers x.x.x.x
#acl manager proto cache_object
#acl localhost src 127.0.0.1/32 ::1
#acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
#acl localnet src x.x.x.x.0/24
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged)
machines
## Ports to allow:
acl Safe_ports port 443 # https
acl Safe_ports port 80 # http
acl Safe_ports port 8080
#acl Safe_ports port 21 # ftp
#acl Safe_ports port 70 # gopher
#acl Safe_ports port 210 # wais
#acl Safe_ports port 1025-65535 # unregistered ports
#acl Safe_ports port 280 # http-mgmt
#acl Safe_ports port 488 # gss-http
#acl Safe_ports port 591 # filemaker
#acl Safe_ports port 777 # multiling http
## CONNECT method:
#acl CONNECT method CONNECT
## LDAP Authentication ##
auth_param basic program /usr/local/squid1/libexec/basic_ldap_auth -b
"dc=ldap,dc=corp,dc=domain,dc=com" -f "uid=%s" ldapserv.corp.domain.com
auth_param basic children 5
#auth_param basic realm Web-Proxy
auth_param basic credentialsttl 30 minutes
acl ldap-auth proxy_auth REQUIRED
## Visible Hostname ##
visible_hostname proxy-01
external_acl_type ldap_group %LOGIN
/usr/local/squid1/libexec/ext_ldap_group_acl -R -b
"ou=groups,dc=gcsldap,dc=corp,dc=domain,dc=com" -D
"cn=cost,ou=admin,dc=gcsldap,dc=corp,dc=domain,dc=com" -f "(&(memberuid=%u)
(cn=%a))" -w password -h ldap.corp.domain.com
#external_acl_type ldap_group %LOGIN /usr/lib64/squid/squid_ldap_group -R
-b "ou=groups,dc=mydomain,dc=net" -D "cn=root,dc=mydomain,dc=net" -f
"(&(sn=%u) (cn=%a))" -w password -h localhost
#http_access allow ldap-auth
## ACL's for group checking ##
acl yumrepo external ldap_group yumrepo
acl winupdate external ldap_group winupdate
acl network-update external ldap_group network-update
## ACL's for url domains ##
acl rule1 url_regex -i "/usr/local/squid1/etc/allowed/yumrepo/domains"
acl rule2 url_regex -i "/usr/local/squid1/etc/allowed/winupdate/domains"
acl rule3 url_regex -i
"/usr/local/squid1/etc/allowed/network-update/domains"
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
#http_access deny CONNECT !SSL_ports
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
#http_access allow localhost
http_access allow rule1 ldap-auth yumrepo
http_access allow rule2 ldap-auth winupdate
http_access allow rule3 ldap-auth network-update
# And finally deny all other access to this proxy
#http_access deny all
# Squid normally listens to port 3128
http_port 8080
# Uncomment and adjust the following to add a disk cache directory.
maximum_object_size 1000 MB
cache_dir ufs /var/spool/squid 1000 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
# Add any of your own refresh_pattern entries above these.
#refresh_pattern ^ftp: 1440 20% 10080
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
#refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90%
432000 override-expire override-lastmod ignore-no-cache ignore-no-store
ignore-private
#refresh_pattern -i .(deb|rpm|exe|zip|tar|tgz|bz2|ram|rar|bin)$ 129600
100% 129600 override-expire ignore-no-cache ignore-no-store
refresh_pattern . 0 20% 4320
debug_options ALL,1 33,2 28,9
On Wed, Oct 7, 2015 at 12:18 PM, nando mendonca <nandomendonca007 at gmail.com>
wrote:
> Hi,
>
> I have squid 3.1 installed using ldap authentication. When i access a
> browser i enter my ldap credentials and it works fine. I’m able to browse
> all sites without any issues.
>
>
> Is there a way to use ldap groups to allow certain groups access to a few
> sites on the internet and then pretty much block everything else?
>
>
> I’m able to restrict access to only a couple of sites and block everything
> else without using ldap group authentication, was just hoping this can be
> done with ldap group authentication.
>
>
> Thanks,
> Nando
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160125/589e0630/attachment-0001.html>
More information about the squid-users
mailing list