【问题标题】:Integrating multiple active directory groups with Squid access lists将多个活动目录组与 Squid 访问列表集成
【发布时间】:2013-11-05 20:29:24
【问题描述】:

所以我有多个活动目录组,我正试图将它们集成到 squid 中。我已将位于

的 URL 列表分类

"/etc/squid/blacklists/"

当我将用户添加到特定组时,我希望 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

【问题讨论】:

    标签: proxy active-directory ldap squid whitelist


    【解决方案1】:

    Squid 在第一次匹配时停止处理规则。如果您将一个帐户添加到这两个组,那么当用户尝试从这些类别之一访问网站时,它总是匹配“拒绝”ACL 之一。

    您可以使用“允许”规则:

    http_access allow NEWS rule1
    http_access allow SHOPPING rule2
    http_access deny all
    

    在这种情况下,所有匹配的都被允许,所有不匹配的都被拒绝。

    为了使其更具可读性,您可以重命名 acls:

    http_access allow group-NEWS url_regex-news
    http_access allow group-SHOPPING url_regex-shopping
    http_access deny all
    

    【讨论】:

      猜你喜欢
      • 2015-12-06
      • 1970-01-01
      • 2019-01-08
      • 2013-08-10
      • 2014-06-25
      • 2015-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多