LinuxSir.cn,穿越时空的Linuxsir!

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

squid中限制exe.zip之类的文件??

[复制链接]
发表于 2003-9-16 16:28:44 | 显示全部楼层 |阅读模式
acl mmxfile urlpath_regex \.mp3$ \.avi$ \.exe$
http_access deny mmxfile
上面的命令应该是限制下载 mp3 avi exe的文件。我的问题是如果就按照上面的书写格式写入squid.conf的话是不是对所有的客户机生效啊。如果我现在只想限制192.168.1.2这台电脑进行限制我如何写呢?
发表于 2003-9-16 17:21:20 | 显示全部楼层
不可以这样吧 哪位兄弟知道。。。
 楼主| 发表于 2003-9-16 18:31:58 | 显示全部楼层
up up up up up 顶一下!!!!
发表于 2003-9-16 20:30:30 | 显示全部楼层

有一个想法

http_access 好象是有顺序的

acl badguy 192.168.1.2/32
http_access allow !badguy   
acl mmxfile urlpath_regex \.mp3$ \.avi$ \.exe$
http_access deny mmxfile   
http_access allow badguy   

不妨一试 :cool:
发表于 2003-9-17 11:14:23 | 显示全部楼层
可以这样
acl  allow_host src  192.168.2.0/24
acl  no_allow_file  urlpath_regex  \.mp3$ \/vai$ \.exe$
http_access allow allow_host no_allow_file
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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