【问题标题】:Squid user external AUTH plus white listSquid 用户外部 AUTH 加白名单
【发布时间】:2012-08-19 08:36:50
【问题描述】:

不确定我是否在搜索正确的术语,还没有找到解决此组合问题的方法。

我有一个正在工作的外部身份验证(tp。但是一旦通过身份验证,我想限制为一个小的白名单(以配置 www.cnn.com 为例)。

我确定这是一个排序/优先级问题,但我终其一生都无法弄清楚。

以下 squid.conf 适用于外部身份验证,但允许一切通过(当然)。似乎无法将白名单“连接/关联”到 foo,例如认证项目

# acl whitelist dstdomain .cnn.com
# http_access allow whitelist
auth_param basic children 5
auth_param basic realm Squid Enter your ID into Username & Password

auth_param basic program /usr/local/bin/tp_squidauth.bash

# this works but it allows anything through once authorised
# what we want is to only restrict to the whitelist
acl foo proxy_auth REQUIRED

# how do i connect whitelist & foo together?
http_access allow foo

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid

希望这对某人来说是显而易见的!?

非常感谢 本

【问题讨论】:

    标签: squid


    【解决方案1】:

    您可以使用所需的白名单页面创建文件:

    /etc/squid/allowed.txt:

    内容:

    .google.com

    .yahoo.com

    .dropbox.com

    然后创建 ACL

    acl allowed_pa​​ges dstdomain "/etc/squid/allowed.txt"

    然后你允许 http 访问并拒绝其余的访问

    http_access 允许 allowed_pa​​ges

    http_access 全部拒绝

    【讨论】:

    • 不错的复制粘贴,但用户要求的白名单是IP白名单。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-20
    相关资源
    最近更新 更多