LinuxSir.cn,穿越时空的Linuxsir!

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

关于squid不能禁止下载的问题?

[复制链接]
发表于 2005-10-14 09:18:53 | 显示全部楼层 |阅读模式
下边是squid配置文件:
http_port 127.0.0.1:3128

cache_mem 32 MB
cache_swap_low 90
cache_swap_high 95
cache_mgr werwe10@163.com
cache_dir ufs /cache/squid 6000 16 256
cache_access_log /usr/local/squid/var/logs/access.log /dev/null
cache_log /usr/local/squid/var/logs/cache.log /dev/null
cache_store_log /usr/local/squid/var/logs/store.log none

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1
acl mmxfile urlpath_regex  -i \.gif$ \.exe$ \.mp3$ \.rmvb$ \.rm$ \.wma$ \.wav$ \.rar$ \.zip
acl star src 192.168.1.0/255.255.255.0
acl teacher arp "/usr/local/squid/teacher.list"
acl teacher1 arp "/usr/local/squid/teacher1.list"
acl baduser maxconn 3

http_access allow teacher teacher1 localhost
http_access deny mmxfile
http_access deny baduser
http_access allow star
http_access deny all

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

我用iptables做的透明代理代码如下:
modprobe ip_tables      
modprobe iptable_nat   
modprobe iptable_filter   
modprobe ip_conntrack_ftp  
modprobe ip_nat_ftp
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F -t nat
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth1 -j SNAT --to xxx.xxx.xxx.xxx
发表于 2005-10-15 11:32:30 | 显示全部楼层
what you want to block ??
just only " \.gif$ \.exe$ \.mp3$ \.rmvb$ \.rm$ \.wma$ \.wav$ \.rar$ \.zip"
回复 支持 反对

使用道具 举报

发表于 2005-10-15 22:25:18 | 显示全部楼层
check your squid.out,然后你会发现哪个语句出错了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-16 17:39:25 | 显示全部楼层
是的我就是要阻止这些被下载!!

我已经试过了,没人什么问题,但就是阻止不了下载!!
回复 支持 反对

使用道具 举报

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

本版积分规则

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