免费注册 查看新帖 |

Chinaunix

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

[proxy] 如何让squid服务器deny的时候不跳出输入用户名密码的提示框啊?[已解决] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-31 14:44 |只看该作者 |倒序浏览
我在规则里面设置了一些网站allow,剩下的deny
当访问allow的网站输入一次就可以了,可是如果访问deny的网站每输入一个都会跳出三次输入用户名密码的提示框才会显示Cache Access Denied的页面,或者点取消显示Cache Access Denied的页面。
请问有没有办法不跳出,直接显示Cache Access Denied的页面呢?

[ 本帖最后由 jealt 于 2007-8-6 14:20 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-08-02 18:07 |只看该作者
那位能指点一下啊?

论坛徽章:
0
3 [报告]
发表于 2007-08-03 09:13 |只看该作者
查找一下本版的一篇我写的关于acl的一个帖子
希望对你有帮助

论坛徽章:
0
4 [报告]
发表于 2007-08-06 13:11 |只看该作者
解决了,不过还是不明白


http_access allow shr hrweb
#http_access deny shr

第二行注释掉就不会出了
是为什么呢?

论坛徽章:
0
5 [报告]
发表于 2007-08-06 13:16 |只看该作者
其实偶也是个新手,可以把你的完整的 acl 部分帖出来么 ?
让我也学习一下。哈哈   

论坛徽章:
0
6 [报告]
发表于 2007-08-06 13:30 |只看该作者
好不容易写完的,贴出来大家看看有什么要改进的~


#Band site and ip
acl band dstdom_regex -i "/etc/squid/acl/band"
http_access deny band

#deny !gzip
acl forestlin src 200.3.248.8/32
acl store14 src 200.4.1.0/24
acl store15 src 200.4.2.0/24
acl store16 src 200.4.3.0/24
acl store17 src 200.4.4.0/24
acl ho src 200.4.0.0/16
acl store31 src 200.3.253.0/24
acl store42 src 200.3.42.0/24
acl store51 src 200.3.51.0/24
acl store66 src 200.3.66.0/24
acl store70 src 200.3.70.0/24
acl store71 src 200.3.71.0/24
acl store79 src 200.3.79.0/24
#http_access deny store14
#http_access allow ho
#http_access deny all
http_access allow forestlin
http_access deny !ho !store31 !store42 !store51 !store66 !store70 !store71 !store79

#ConnLimit
acl connlimit maxconn 20
acl accept src 200.4.0.20-200.4.0.22/32
http_access deny !accept connlimit

#store hr acl
acl shr proxy_auth hr014 hr015 hr016 hr017 hr031 hr042 hr051 hr066 hr070 hr071 hr079
acl hrweb dstdomain "/etc/squid/acl/hrweb"

#File access control
acl faclt url_regex ¨Ci \.exe$\.swf$\.zip$\.rar$\.avi$\.mpg$\.wma$\.mp3$\.wav$
acl facl rep_mime_type -i ^application/x-shockwave-flash$
#acl exefiles rep_mime_type -i ^application/octet-stream$
acl facl rep_mime_type -i ^application/x-zip-compressed$
acl facl rep_mime_type -i ^application/x-rar-compressed$
acl facl rep_mime_type -i ^application/x-ms-wma$
#acl facl rep_mime_type -i ^audio/x-ms-wma$
#acl facl rep_mime_type -i ^audio/basic$
acl facl rep_mime_type -i ^audio/
acl facl rep_mime_type -i ^video/

#MSN control
acl MSNmime rep_mime_type -i ^application/x-msn-messenger$

#MAX ip control
acl resip max_user_ip -s 4

#Band sites
acl bands dstdom_regex mp3
acl bands dstdom_regex games
acl bands dstdom_regex game
acl bands dstdom_regex mail
acl bands dstdom_regex mailx
acl bands dstdom_regex sex
acl im dstdom_regex tencent
acl bands dstdom_regex popo
acl im dstdom_regex qq
acl ip dst 202.108.42.0/255.255.255.0
acl qq dst "/etc/squid/acl/qqweb"
#acl bands dst "/etc/squid/acl/msnweb"
acl ip dst "/etc/squid/acl/popoweb"
acl bands dstdom_regex kele8.com
acl ip dst 218.18.95.0/255.255.255.0
acl port443 port 443

#Allow sites
acl allows dstdom_regex 51job.com
acl allows dstdom_regex jobcn.com
acl allows dstdom_regex jobsdb.com
acl allows dstdom_regex buildhr.com
acl allows dstdom_regex hxrc.com
acl allows dstdom_regex strc.com.cn
acl allows dstdom_regex shunde.net.cn
acl allows dstdom_regex chinahr.com
acl allows dstdom_regex gzlm.net
acl allows dstdom_regex chaoshiren.com.cn
acl allows dstdom_regex emkt.com.cn
acl allows dstdom_regex i18.cn
acl allows dstdom_regex linkshop.com.cn
acl allows dstdom_regex retailing.com.cn
acl allows dstdom_regex chinarp.net
acl allows dstdom_regex gzyb.net
acl allows dstdom_regex btophr.com
acl allows dstdom_regex erclub.org
acl allows dstdom_regex pysi.net
acl allows dstdom_regex clssn.com
acl allows dstdom_regex yhds.com.cn
acl allows dstdom_regex gzjd
acl allows dstdom_regex localtax
acl allows dstdom_regex fisa.com.cn
acl allowi dst 218.20.227.71/255.255.255.255
acl allowi dst 61.140.186.96/255.255.255.255
#acl allowi dst 210.21.33.90/255.255.255.255
#acl allowi dst 202.103.160.48/255.255.255.255
#acl allowi dst 202.103.160.39/255.255.255.255
acl allows dstdom_regex haozhai.com
acl allows dstdom_regex mofile.com
acl allows dstdom_regex gdcrj.com
acl allows dstdom_regex ctrip.com
acl allows dstdom_regex asiaec.com
acl allows dstdom_regex gznet.com
acl allows dstdom_regex 86fang.com
acl allows dstdom_regex elease.cn
acl allows dstdom_regex gznet.com
acl allows dstdom_regex today123.com
acl allows dstdom_regex gzcars.net
acl allows dstdom_regex pcauto.com.cn
acl allows dstdom_regex ek-chor-cn
acl allows dstdom_regex hkfdo
acl allows dstdom_regex cmbchina
acl allows dstdom_regex ccbgz
acl allows dstdom_regex nh12366.com
acl allows dstdom_regex csacc.org
acl allows dstdom_regex kj999.org
acl allows dstdom_regex gdb.com.cn
acl allows dstdom_regex bankcomm
acl allows dstdom_regex bocgd
acl allows dstdom_regex icbcgd
acl allows dstdom_regex bank-of-china
acl allows dstdom_regex ccb.cn
acl allows dstdom_regex gz.citicib.com.cn
acl allows dstdom_regex ecitic.com
acl allows dstdom_regex bankcomm.com
acl allows dstdom_regex icbc.com.cn
acl allows dstdom_regex kjzgks.com
acl allows dstdom_regex spdb.com.cn
acl allows dstdom_regex cebbank.com.cn
acl allows dstdom_regex citicib.com.cn
acl allows dstdom_regex cmbc.com.cn
acl allows dstdom_regex hxb.com.cn
acl allows dstdom_regex chinaunionpay.com
acl allows dstdom_regex gnete.com
acl allows dstdom_regex creditcard.com.cn
acl allows dstdom_regex zgjrw.com
acl allows dstdom_regex esv.com.cn
acl allows dstdom_regex nh12366.cn
acl allows dstdom_regex gdb.com.cn
acl allows dstdom_regex 163.com
acl allows dstdom_regex esv.com.cn
acl allows dstdom_regex google.com
acl allows dstdom_regex baidu.com
acl allows dstdom_regex chinacourt.org
acl allows dstdom_regex fawang.cn
acl allows dstdom_regex civillaw.com.cn
acl allows dstdom_regex law-lib.com
acl allows dstdom_regex chinalawinfo.com
acl allows dstdom_regex gzlawyer.org
acl allowi dst 202.105.12.125/255.255.255.255
acl allowi dst 210.21.33.90/255.255.255.255
acl allowi dst 202.103.160.39/255.255.255.255
acl allowi dst 202.103.160.48/255.255.255.255
acl allowi dst 210.21.72.103/255.255.255.255
acl allowi dst 61.144.16.83/255.255.255.255
acl allowi dst 218.19.174.153/255.255.255.255
acl allows dstdom_regex etax.163.cn
acl allows dstdom_regex ccitc.net.cn
acl allows dstdom_regex ks-info.net
acl allows dstdom_regex fsfire.com.cn
acl allows dstdom_regex gzstats
acl allows dstdom_regex sohu.com
acl allows dstdom_regex gz-tobacco
acl allows dstdom_regex ideacider.com
acl allows dstdom_regex gznet.com
acl allows dstdom_regex sina.com
acl allows dstdom_regex yahoo.com
acl allows dstdom_regex tqyb.com.cn
acl allows dstdom_regex google.com
acl allows dstdom_regex baidu.com
acl allows dstdom_regex 163.com
acl allows dstdom_regex tom.com
acl allows dstdom_regex sohu.com
acl allows dstdom_regex gz33.com
acl allows dstdom_regex 21cn.com
acl allows dstdom_regex ycwb.com
acl allows dstdom_regex gzdaily.dayoo.com
acl allows dstdom_regex nanfangdaily.com.cn
acl allows dstdom_regex ycwb.com
acl allows dstdom_regex gd-hk.com
acl allows dstdom_regex pyb.com.cn
acl allowd dstdomain .gov.cn
acl allows dstdom_regex gd.cn
acl allows dstdom_regex pyup.com.cn
acl allows dstdom_regex go2map.com
acl allows dstdom_regex zuoche.com
acl allows dstdom_regex people.com.cn
acl allows dstdom_regex 668map.com
acl allows dstdom_regex map.haozhai.com
acl allows dstdom_regex chinametro.net
acl allows dstdom_regex gzfocus.cn
acl allows dstdom_regex xinhuanet.com
acl allows dstdom_regex nanfangdaily.com.cn
acl allows dstdom_regex southcn.com
acl allows dstdom_regex gzmtr.com
acl allows dstdom_regex house.enorth.com.cn
acl allows dstdom_regex gdchain.com.cn
acl allows dstdom_regex yipu.com.cn
acl allows dstdom_regex richland.net.cn
acl allows dstdom_regex mallchina.net
acl allows dstdom_regex news.sdfdc.com
acl allows dstdom_regex gzmall.com
acl allows dstdom_regex myshops.ful.cn
acl allows dstdom_regex gz.focus.cn
acl allows dstdom_regex gdmall.com.cn
acl allows dstdom_regex sunsin.cn
acl allows dstdom_regex aedas.com
acl allows dstdom_regex skyscrapercity.com
acl allows dstdom_regex kingproperty.com.cn
acl allows dstdom_regex louking.com.cn
acl allows dstdom_regex ycwb.com
acl allows dstdom_regex cnhan.com
acl allows dstdom_regex jxfw.com
acl allows dstdom_regex house.nen.com.cn
acl allows dstdom_regex 51sobu.com
acl allows dstdom_regex finance.eastday.com
acl allows dstdom_regex southcn.com
acl allows dstdom_regex bbs.people.com.cn
acl allows dstdom_regex cnworld.net
acl allows dstdom_regex midland.com.cn
acl allows dstdom_regex news365.com.cn
acl allows dstdom_regex dycj.ynet.com
acl allows dstdom_regex longhoo.net
acl allows dstdom_regex agents.org.cn
acl allows dstdom_regex ben.com.cn
acl allows dstdom_regex aaart.com.cn
acl allows dstdom_regex p5w.net
acl allows dstdom_regex zgfdcb.com
acl allows dstdom_regex villachina.com
acl allows dstdom_regex 086.com.cn
acl allows dstdom_regex zytop.com
acl allows dstdom_regex livingchina.cn
acl allows dstdom_regex unn.com.cn
acl allows dstdom_regex heungkong.com
acl allows dstdom_regex ycwb.com
acl allows dstdom_regex guangzhou.8684.cn
acl allows dstdom_regex gzfcw

###test###
acl test proxy_auth jealt
http_access allow test
##########

#User Group acls
#Allow all sites users
acl aa proxy_auth sunnyh gavinp jasonp bird tiger betty tongtang

#allow all sites with MSN and QQ
#M.D.
acl awmq proxy_auth sandychen liuqin
#Financial
acl awmq proxy_auth sunee chaiporn jasontan mark_xie selinazhang fin-banking
#H.R.
acl awmq proxy_auth pactrick
#Operations
acl awmq proxy_auth shirley_wang

#allow all sites with MSN permission
#I.S.
acl awm proxy_auth gzdchr xiaohongz userhr
#M.D.
acl awm proxy_auth liwenhai gztraining ben
acl awm proxy_auth jmsdm frank
#Financial
acl awm proxy_auth young chaosfin
#Procducement
acl awm proxy_auth richardf
#Marketing
acl awm proxy_auth pinesyc malcolm groupsales selinawang kennyl dingxz
acl awm proxy_auth wangxin waterdu evagu crist jane1024 eric_liang
#B.D.
acl awm proxy_auth henryd
#Construction
acl awm proxy_auth alexanderx davidfu johnliang
#MDSE HardLine
acl awm proxy_auth bearw larryso mandy jackeych albert jessica nellylee frank_yang
#MDSE housebrand
acl awm proxy_auth vivianl
#apparel
acl awm proxy_auth apperal
#fresh
acl awm proxy_auth roy_xie
#Operations
acl awm proxy_auth sontaya Robert_hsu
#Fresh
acl awm proxy_auth annazhang marco
#I.M. & S.P.T
acl awm proxy_auth jeffw
#HVAC
acl awm proxy_auth jinzhiliang kellyhuang bruceyu
#PBL
acl awm proxy_auth yixiny
#CONSIGHMENT
acl awm proxy_auth simonj Amych

#allow all sites with exception
#I.S.
acl awe proxy_auth annay
#M.D.
#acl isdit proxy_auth sanshuihr
#Financial
acl awe proxy_auth tobacco nancy belindawu snowyang Chaoxia_Duan ellen_tang kitty_tan
#MDSE-Sourcing
acl awe proxy_auth vickyw xinyanh simonli luoli vincelin
#H.R.
acl awe proxy_auth angelaw hohr
#Operations
acl awe proxy_auth jasonzhang
#Apparel
acl awe proxy_auth forestlin

#allow site only
#Financial
acl aso proxy_auth djkai
#B.D.
acl aso proxy_auth samwang
#H.R.
acl isda proxy_auth floral candyt sandychen


#Access control list

#store hr access
http_access allow shr hrweb
http_access deny shr

#Allow all group
http_access allow aa

http_access deny bands
http_reply_access deny facl
http_access deny faclt

#Allow with msn qq
http_access allow awmq

http_access deny im port443
http_access deny ip port443
http_access deny qq

#Allow all sites with MSN permission
http_access allow awm

http_reply_access deny MSNmime

#allow all sites with exception
http_access allow awe

#allow site only
http_access allow aso allowi
http_access allow aso allows
http_access allow aso allowd

http_access deny all

论坛徽章:
0
7 [报告]
发表于 2007-09-18 18:14 |只看该作者
原帖由 jealt 于 2007-8-6 13:30 发表
好不容易写完的,贴出来大家看看有什么要改进的~


#Band site and ip
acl band dstdom_regex -i "/etc/squid/acl/band"
http_access deny band

#deny !gzip
acl forestlin src 200.3.248.8/32
acl  ...


请教一个问题你是不是用ldap ??

请问你的东西是不是全部能够走??

[ 本帖最后由 anakin81 于 2007-9-18 18:31 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2007-09-25 08:34 |只看该作者
不是ldap
是基于ncsa的用户验证

经过测试deny的部分还是要对每一个组分别做才可以,按照上面的acl所有的组都不可以访问deny的部分

论坛徽章:
0
9 [报告]
发表于 2011-04-26 14:58 |只看该作者
搜铺网(www.sopuwang.com)全球最具服务的商业地产门户网站
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP