免费注册 查看新帖 |

Chinaunix

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

[proxy] 这个配置为什么无法用时间控制用户上网-已解决 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-17 07:56 |只看该作者 |倒序浏览
http_port  808
cache_mem 64 MB
cache_swap_low 90
cache_swap_high 95
dns_nameservers 202.*.*.*
cache_dir ufs /usr/local/squid/var/cache  25000 16 256
error_directory /usr/local/squid/share/errors/Simplify_Chinese
emulate_httpd_log on
cache_store_log none
logfile_rotate 1
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex -i cgi-bin \? \.asp \.php \.jsp \.cgi
acl denyssl urlpath_regex -i ^https:\\
acl worktime time MTWHF 8:00-11:30 13:00-17:00
no_cache deny QUERY
no_cache deny denyssl
auth_param basic program /usr/local/squid/libexec/ncsa_auth /etc/squid/passwd.sq
auth_param basic children 10
auth_param basic realm proxy.linuxserver.com
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp:                1440        20%        10080
refresh_pattern ^gopher:        1440        0%        1440
refresh_pattern .                0        20%        4320
acl OverConnLimit maxconn 5
acl advance arp 00:*:*:*:*
acl all src 192.168.0.0/24
acl auth_user proxy_auth REQUIRED
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 563
acl Safe_ports port 80                # http
acl Safe_ports port 21                # ftp
acl Safe_ports port 443 563        # https, snews
acl Safe_ports port 70                # gopher
acl Safe_ports port 210                # wais
acl Safe_ports port 1025-65535        # unregistered ports
acl Safe_ports port 280                # http-mgmt
acl Safe_ports port 488                # gss-http
acl Safe_ports port 591                # filemaker
acl Safe_ports port 777                # multiling http
acl CONNECT method CONNECT
http_access allow advance
http_access deny !worktime
http_access allow auth_user
http_access deny OverConnLimit
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /usr/local/squid/var/cache
这个配置advance不用输入用户名和密码可以不限时间上网,可auth_user用用户名和密码也可以上网,无法用时间控制,不知道错在哪里,请高手指教

[ 本帖最后由 wellsman 于 2007-5-26 08:53 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-05-17 15:38 |只看该作者
acl worktime time MTWHF 8:00-11:30 13:00-17:00
修改上行,这样试试
acl worktime time MTWHF 8:00-11:30
acl worktime time MTWHF 13:00-17:00

论坛徽章:
0
3 [报告]
发表于 2007-05-17 16:59 |只看该作者
还是不行,我分成两段
acl worktime1  time MTWHF  8:00-11:30

acl worktime2  time MTWHF  13:00-17:00

论坛徽章:
0
4 [报告]
发表于 2007-05-23 12:08 |只看该作者
http_access deny !worktime
这个条件写反了,你要求的是worktime 不能上网吧,现在是非工作时间不能上网

论坛徽章:
0
5 [报告]
发表于 2007-05-24 08:21 |只看该作者
http_port  808
cache_mem 32 MB
dns_nameservers   202.96.64.68  202.96.69.38
cache_dir aufs /usr/local/squid/var/cache 25000 16 256
error_directory /usr/local/squid/share/errors/Simplify_Chinese
emulate_httpd_log on
cache_store_log none
logfile_rotate 1
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex -i cgi-bin \? \.asp \.php \.jsp \.cgi
acl denyssl urlpath_regex -i ^https:\\
acl worktime1 time MTWHF 8:00-11:00
acl worktime2 time MTWHF 13:00-17:00
no_cache deny QUERY
no_cache deny denyssl
auth_param basic program /usr/local/squid/libexec/ncsa_auth /etc/squid/passwd.sq
auth_param basic children 10
auth_param basic realm proxy.linuxserver.com
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp:                1440        20%        10080
refresh_pattern ^gopher:        1440        0%        1440
refresh_pattern .                0        20%        4320

acl OverConnLimit maxconn 5
acl advance arp 00:19:B9:*.*
acl auth_user proxy_auth REQUIRED
acl all src 0.0.0.0/0.0.0.0
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 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

http_access allow advance
http_access deny worktime1
http_access deny worktime2
http_access allow auth_user
http_access deny OverConnLimit
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /usr/local/squid/var/cache


完整的配置,解决!

[ 本帖最后由 wellsman 于 2007-5-26 08:53 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP