首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在鱿鱼3中配置黑名单?

如何在鱿鱼3中配置黑名单?
EN

Ask Ubuntu用户
提问于 2012-07-09 10:15:58
回答 1查看 11.7K关注 0票数 1

我像这样配置乌贼,但是黑名单不起作用。我在网上找东西,但什么也找不到。

代码语言:javascript
复制
#SQUID squid.conf

http_port 8080

############################################################

#Database Authentication MYSQL

auth_param basic program /usr/lib/squid3/squid_db_auth --dsn "DBI:mysql:database=something " --user something --password something --plaintext --persist
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 30 minute
auth_param basic casesensitive off
acl db-auth proxy_auth REQUIRED
http_access allow db-auth

#############################################################

#ACL

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
acl SSL_ports port 443
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
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
acl CONNECT method CONNECT

acl blacklist dstdom_regex -i "/etc/squid3/blacklist"

##############################################################


#LISTA OPERAZIONI ACL
http_access deny blacklist

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all

##############################################################

coredump_dir /var/spool/squid3

黑名单文件如下:

代码语言:javascript
复制
facebook.it
facebook.com
EN

回答 1

Ask Ubuntu用户

发布于 2012-07-14 02:03:11

对每个请求按顺序计算http_access语句,并一旦匹配评估停止。因此,http_access allow db-auth应该放在http_access deny blacklist之后。这样,黑名单就会被强制执行,然后进行身份验证。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/161489

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档