proxy - 鱿鱼 dstdom_regex 不工作

标签 proxy centos squid

我想在 squid 3.2.3 中拒绝所有以 iso 开头的 URL
所以,我放入了 squid.conf:

  acl torrent_sites dstdom_regex -i iso
  acl music_sites dstdom_regex -i music

和我的 http 控件,如:
  http_access allow localhost
  http_access allow localnetp1
  http_access deny torrent_sites localnetp1
  http_access deny music_sites
  http_access deny ftp_request
  http_access deny localnetp1 norm_conn
  http_access deny all

但是我可以进入isohunt.com页面,为什么?

最佳答案

我正在使用稍微不同的方法。我正在使用标准的 squid.conf 文件,但更改了 #acl localnet src 192.168.0.0/16到我的网络 IE:“192.168.1.0”。然后在 conf 文件中搜索读取的部分,

#deny_info TCP_RESET ads".  

只是 以上 TCP_RESET 行,添加以下内容。
acl torrent dstdom_regex "/path/torrent_sites.txt"
http_access deny torrent
acl music dstdom_regex "/path/music_sites.txt"
http_access deny music

现在创建 2 个文本文件( /path/torrent_sites.txt/path/music_sites.txt ),其中包含以下格式的 URL。
(^|\.)isohunt\.com$
(^|\.)thepiratebay\.org$
(^|\.)torrentz\.com$

等等
sudo /etc/init.d/squid3 restart

或者你想重新启动它,一切都应该很好!

黑名单可以在这里找到:squid ACL examples & blacklist to download

关于proxy - 鱿鱼 dstdom_regex 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13690011/

相关文章:

java - 泰鲁斯 wss ://websocket not passing through squid proxy

android - proxy无法解析

git - 如何让 Git 在推送到远程存储库时只询问密码

django - 使用 Gunicorn 和 APACHE 部署 Django

linux - 运行 perf 进程时 CentOS 6.5 内核崩溃

apache - 无法从主机名确定 IP 地址

curl - HTTP_PROXY无法正常工作

centos - 即使在 CentOS 8 上将 CA 证书添加到信任库后也会出现证书错误

linux - CentOS 使用 SNMP 显示接口(interface)使用情况

linux - 代理设置不起作用