免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2271 | 回复: 4
打印 上一主题 下一主题

[proxy] 怪事。。squid访问控制问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-11 16:47 |只看该作者 |倒序浏览
目的:通过代理只允许访问.sina.com.cn

ACL是:
acl allowsite dstdomain .sina.com.cn
http_access deny !allowsite

结果发现域名是XXX.com.cn的网站都可以访问~~~~~~~

要怎样写acl才能达到俺目的(不是通过IP来限制)。

[ 本帖最后由 耶寇 于 2007-4-11 17:35 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-04-11 18:48 |只看该作者
试试这样

acl allowsite dstdomain .sina.com.cn
http_access allow allowsite
http_access deny !allowsite


或者

acl allowsite dstdomain .sina.com.cn
acl alldst dst 0.0.0.0/0.0.0.0
http_access allow allowsite
http_access deny alldst

论坛徽章:
0
3 [报告]
发表于 2007-04-12 17:45 |只看该作者
请问使用squid代理如何同时具有dns解析功能?

论坛徽章:
0
4 [报告]
发表于 2007-04-13 20:45 |只看该作者
dns_nameservers    1.2.3.4

一般不建议用squid解析dns,因为squid只解析一次,如果网站改了ip,就无法访问了

论坛徽章:
0
5 [报告]
发表于 2007-04-16 09:25 |只看该作者
发现把它放到后面就不会出现这种情况

acl allowsite dstdomain .china.com .sina.com.cn
http_access deny !allowsite
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP