LinuxSir.cn,穿越时空的Linuxsir!

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

有关squid配置的问题

[复制链接]
发表于 2007-11-14 20:51:20 | 显示全部楼层 |阅读模式
以下是我的配置:
# WELCOME TO SQUID 2.6.STABLE5
# ----------------------------

http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 512 MB
cache_dir ufs /var/spool/squid 512 16 256
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
read_timeout 1 minutes

acl all src 0.0.0.0/0.0.0.0
acl working_time time 8:00-21:30
acl company_src src "/etc/squid/company.src"
acl company_dst dst "/etc/squid/company.dst"
acl company_domain dstdomain "/etc/squid/company.domain"
acl AntiVirus dstdomain "/etc/squid/antivirus.domain"
acl zhyz_dst dst "/etc/squid/zhyz.dst"
acl zhyz_domain dstdomain "/etc/squid/zhyz.domain"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443   # https
acl Safe_ports port 80 81   # http
acl Safe_ports port 21   # ftp
acl Safe_ports port 443  # https
acl Safe_ports port 1025-65535  # unregistered ports
acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow company_src working_time
http_access allow company_dst working_time
http_access allow company_domain working_time
http_access allow AntiVirus working_time
http_access allow zhyz_dst working_time
http_access allow zhyz_domain working_time
http_access deny all

http_reply_access allow all
icp_access allow all

httpd_suppress_version_string off

visible_hostname hhuni

always_direct allow AntiVirus
always_direct allow zhyz_dst
always_direct allow zhyz_domain

这个配置能够正常运行,但是所有的用户都没有限制,所有的客户可以访问任意一个网址没有任何限制,似乎http_access deny all 没有什么作用。
请各位大侠指导。
 楼主| 发表于 2007-11-15 21:48:42 | 显示全部楼层
自己搞定,在末尾添加:
never_direct allow all
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-15 21:51:10 | 显示全部楼层
建议把板块名称改为“debian 桌面”,大多数有关网络协议的问题,在这里都无法寻找到答案,连错误的答案都不会有。
回复 支持 反对

使用道具 举报

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

本版积分规则

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