LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 686|回复: 1

squid的acl访问控制问题

[复制链接]
发表于 2005-6-1 10:37:01 | 显示全部楼层 |阅读模式
配置文件:
http_port 192.168.35.1:3128
dns_nameservers 210.82.8.1 210.82.5.1
visible_hostname as3
cache_dir ufs /var/spool/squid 1000 24 256
cache_mem 80 MB
cache_swap_low 90
cache_swap_high 95
httpd_accel_host as3
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl myclients src 192.168.35.0/24
acl all src 0.0.0.0/0.0.0.0

acl qq_1 url_regex -i qq
acl qq_2 url_regex -i tencent
acl msn_domain dstdomain www.msn.com

http_access allow myclients
http_access deny qq_1
http_access deny qq_2
http_access deny msn_domain
http_access deny all

设置客户端使用3218端口的代理
共享上网没有问题,但是访问控制都没有成功
acl qq_2 url_regex -i tencent 应该是拒绝访问url中包含tencent的网址
可是我还能访问www.tencent.com
是我哪里设置错了吗?
 楼主| 发表于 2005-6-1 14:05:24 | 显示全部楼层
搞定
http_port 192.168.35.1:3128
dns_nameservers 210.82.8.1 210.82.5.1
visible_hostname as3
cache_dir ufs /var/spool/squid 1000 24 256
cache_mem 80 MB
cache_swap_low 90
cache_swap_high 95
httpd_accel_host as3
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl myclients src 192.168.35.0/24
acl all src 0.0.0.0/0.0.0.0

acl qq_1 url_regex -i qq
acl qq_2 url_regex -i tencent
acl msn_domain dstdomain www.msn.com

http_access deny qq_1
http_access deny qq_2
http_access deny msn_domain
http_access allow myclients
http_access deny all

改一下http_access allow myclients的位置就可以了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表