免费注册 查看新帖 |

Chinaunix

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

[proxy] 帮我看看我的配置文件,为什么“!”不行! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-24 10:06 |只看该作者 |倒序浏览
#############ACL###############

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
#acl all_user proxy_auth REQUIRED
#acl auth_user proxy_auth -i "/etc/squid/acl/wwwuser"
acl allowvlan src "/etc/squid/acl/allowvlan"
#acl worktime time MTWHF 8:30-21:00
#acl denyvlan src "/etc/squid/acl/denyvlan"
#acl denydomain dstdomain "/etc/squid/acl/denydomain"
#acl denyweb dst "/etc/squid/acl/denyweb"

#############http_access##########

http_access deny !allowvlan
#http_access deny !Safe_ports
#http_access deny !worktime
#http_access allow auth_user
#http_access deny all_user
#http_access allow manager localhost
#http_access deny denydomain
#http_access deny denyweb
#http_access deny manager
#http_access deny CONNECT !SSL_ports
#http_access allow localhost
#http_reply_access allow all
#icp_access allow all
http_access deny all

真正生效的就这几个,其他都是测试的。为什么“http_access deny !allowvlan”这句不生效呢?在aclallowvlan里写的192.168.40.0/24。
但是当把这句换成“http_access allow allowvlan”就生效。麻烦谁帮忙解释一下!

难道我没吃透这语法?

论坛徽章:
0
2 [报告]
发表于 2009-12-24 11:40 |只看该作者
你说的不生效是192.168.40.0/24不能上网
还是非192.168.40.0/24的可以上网

192.168.40.0/24根据你的设置当然是不可以的,因为你一共就两条都是deny的....

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
3 [报告]
发表于 2009-12-24 16:11 |只看该作者
deny !

论坛徽章:
0
4 [报告]
发表于 2009-12-25 11:07 |只看该作者
原帖由 dong_kof 于 2009-12-24 11:40 发表
你说的不生效是192.168.40.0/24不能上网
还是非192.168.40.0/24的可以上网

192.168.40.0/24根据你的设置当然是不可以的,因为你一共就两条都是deny的....


我是需要加一个容许上网的策略吗?

比如在这条前面加一个“http_access allow allowvlan”

?是这样吗?

论坛徽章:
0
5 [报告]
发表于 2009-12-25 12:56 |只看该作者
是的

论坛徽章:
0
6 [报告]
发表于 2010-01-22 16:15 |只看该作者
原帖由 dong_kof 于 2009-12-25 12:56 发表
是的



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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP