所以我有多个活动目录组,我正试图将它们集成到 squid 中。我已经对位于的 URL 列表进行了分类
“/etc/squid/黑名单/”
当我将用户添加到特定组时,我希望 squid 允许该用户浏览该列表中的任何网站。每个用户将是多个组的成员,具体取决于那里的角色。目前我所拥有的将允许用户浏览网站,只要只有其中一个组的成员,但如果我将用户添加到两个组中,那么他们就看不到任何东西!我总共有大约 50 个类别要实施。以下是我目前在 squid.conf 文件中列出的内容。
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# AD communication #
auth_param basic program /usr/lib64/squid/squid_ldap_auth -R -b "DC=domain,DC=local" -D "CN=SQUID,OU=domain Service Accounts,DC=domain,DC=local" -w "*********" -f sAMAccountName=%s -h 10.0.0.***,10.0.0.***,10.0.0.***
auth_param basic children 5
auth_param basic realm Please enter your domain credentials to continue
auth_param basic credentialsttl 1 hour
# AD group membership commands
external_acl_type ldap_group %LOGIN /usr/lib64/squid/squid_ldap_group -R -b "DC=domain,DC=local" -D "CN=SQUID,OU=domain Service Accounts,DC=domain,DC=local" -w "*********" -f "(&(objectclass=person) (sAMAccountname=%v)(memberof=CN=%a,OU=PROXY,ou=ALL domain Groups,DC=domain,DC=local))" -h 10.0.0.***,10.0.0.***,10.0.0.***
acl NEWS external ldap_group NEWS
acl SHOPPING external ldap_group SHOPPING
acl rule1 url_regex -i "/etc/squid/blacklists/news/domains"
acl rule2 url_regex -i "/etc/squid/blacklists/shopping/domains"
http_access deny NEWS !rule1
http_access deny SHOPPING !rule2
http_access allow all